Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/src/test_schema.c

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 ** 2006 June 10 2 ** 2006 June 10
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if( SQLITE_OK!=(rc = finalize(&pCur->pTableList)) ) goto next_exit; 182 if( SQLITE_OK!=(rc = finalize(&pCur->pTableList)) ) goto next_exit;
183 183
184 assert(pCur->pDbList); 184 assert(pCur->pDbList);
185 while( SQLITE_ROW!=sqlite3_step(pCur->pDbList) ){ 185 while( SQLITE_ROW!=sqlite3_step(pCur->pDbList) ){
186 rc = finalize(&pCur->pDbList); 186 rc = finalize(&pCur->pDbList);
187 goto next_exit; 187 goto next_exit;
188 } 188 }
189 189
190 /* Set zSql to the SQL to pull the list of tables from the 190 /* Set zSql to the SQL to pull the list of tables from the
191 ** sqlite_master (or sqlite_temp_master) table of the database 191 ** sqlite_master (or sqlite_temp_master) table of the database
192 ** identfied by the row pointed to by the SQL statement pCur->pDbList 192 ** identified by the row pointed to by the SQL statement pCur->pDbList
193 ** (iterating through a "PRAGMA database_list;" statement). 193 ** (iterating through a "PRAGMA database_list;" statement).
194 */ 194 */
195 if( sqlite3_column_int(pCur->pDbList, 0)==1 ){ 195 if( sqlite3_column_int(pCur->pDbList, 0)==1 ){
196 zSql = sqlite3_mprintf( 196 zSql = sqlite3_mprintf(
197 "SELECT name FROM sqlite_temp_master WHERE type='table'" 197 "SELECT name FROM sqlite_temp_master WHERE type='table'"
198 ); 198 );
199 }else{ 199 }else{
200 sqlite3_stmt *pDbList = pCur->pDbList; 200 sqlite3_stmt *pDbList = pCur->pDbList;
201 zSql = sqlite3_mprintf( 201 zSql = sqlite3_mprintf(
202 "SELECT name FROM %Q.sqlite_master WHERE type='table'", 202 "SELECT name FROM %Q.sqlite_master WHERE type='table'",
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 aObjCmd[i].xProc, aObjCmd[i].clientData, 0); 337 aObjCmd[i].xProc, aObjCmd[i].clientData, 0);
338 } 338 }
339 return TCL_OK; 339 return TCL_OK;
340 } 340 }
341 341
342 #else 342 #else
343 343
344 /* 344 /*
345 ** Extension load function. 345 ** Extension load function.
346 */ 346 */
347 int sqlite3_extension_init( 347 #ifdef _WIN32
348 __declspec(dllexport)
349 #endif
350 int sqlite3_schema_init(
348 sqlite3 *db, 351 sqlite3 *db,
349 char **pzErrMsg, 352 char **pzErrMsg,
350 const sqlite3_api_routines *pApi 353 const sqlite3_api_routines *pApi
351 ){ 354 ){
352 SQLITE_EXTENSION_INIT2(pApi); 355 SQLITE_EXTENSION_INIT2(pApi);
353 #ifndef SQLITE_OMIT_VIRTUALTABLE 356 #ifndef SQLITE_OMIT_VIRTUALTABLE
354 sqlite3_create_module(db, "schema", &schemaModule, 0); 357 sqlite3_create_module(db, "schema", &schemaModule, 0);
355 #endif 358 #endif
356 return 0; 359 return 0;
357 } 360 }
358 361
359 #endif 362 #endif
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/src/test_rtree.c ('k') | third_party/sqlite/sqlite-src-3080704/src/test_server.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698