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

Side by Side Diff: third_party/sqlite/src/src/test_onefile.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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
« no previous file with comments | « third_party/sqlite/src/src/test_mutex.c ('k') | third_party/sqlite/src/src/test_osinst.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** 2007 September 14 2 ** 2007 September 14
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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 */ 501 */
502 static int fsSync(sqlite3_file *pFile, int flags){ 502 static int fsSync(sqlite3_file *pFile, int flags){
503 fs_file *p = (fs_file *)pFile; 503 fs_file *p = (fs_file *)pFile;
504 fs_real_file *pReal = p->pReal; 504 fs_real_file *pReal = p->pReal;
505 sqlite3_file *pRealFile = pReal->pFile; 505 sqlite3_file *pRealFile = pReal->pFile;
506 int rc = SQLITE_OK; 506 int rc = SQLITE_OK;
507 507
508 if( p->eType==DATABASE_FILE ){ 508 if( p->eType==DATABASE_FILE ){
509 unsigned char zSize[4]; 509 unsigned char zSize[4];
510 zSize[0] = (pReal->nDatabase&0xFF000000)>>24; 510 zSize[0] = (pReal->nDatabase&0xFF000000)>>24;
511 zSize[1] = (pReal->nDatabase&0x00FF0000)>>16; 511 zSize[1] = (unsigned char)((pReal->nDatabase&0x00FF0000)>>16);
512 zSize[2] = (pReal->nDatabase&0x0000FF00)>>8; 512 zSize[2] = (pReal->nDatabase&0x0000FF00)>>8;
513 zSize[3] = (pReal->nDatabase&0x000000FF); 513 zSize[3] = (pReal->nDatabase&0x000000FF);
514 rc = pRealFile->pMethods->xWrite(pRealFile, zSize, 4, 0); 514 rc = pRealFile->pMethods->xWrite(pRealFile, zSize, 4, 0);
515 } 515 }
516 if( rc==SQLITE_OK ){ 516 if( rc==SQLITE_OK ){
517 rc = pRealFile->pMethods->xSync(pRealFile, flags&(~SQLITE_SYNC_DATAONLY)); 517 rc = pRealFile->pMethods->xSync(pRealFile, flags&(~SQLITE_SYNC_DATAONLY));
518 } 518 }
519 519
520 return rc; 520 return rc;
521 } 521 }
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 if( fs_vfs.pParent ) return SQLITE_OK; 821 if( fs_vfs.pParent ) return SQLITE_OK;
822 fs_vfs.pParent = sqlite3_vfs_find(0); 822 fs_vfs.pParent = sqlite3_vfs_find(0);
823 fs_vfs.base.mxPathname = fs_vfs.pParent->mxPathname; 823 fs_vfs.base.mxPathname = fs_vfs.pParent->mxPathname;
824 fs_vfs.base.szOsFile = MAX(sizeof(tmp_file), sizeof(fs_file)); 824 fs_vfs.base.szOsFile = MAX(sizeof(tmp_file), sizeof(fs_file));
825 return sqlite3_vfs_register(&fs_vfs.base, 0); 825 return sqlite3_vfs_register(&fs_vfs.base, 0);
826 } 826 }
827 827
828 #ifdef SQLITE_TEST 828 #ifdef SQLITE_TEST
829 int SqlitetestOnefile_Init() {return fs_register();} 829 int SqlitetestOnefile_Init() {return fs_register();}
830 #endif 830 #endif
OLDNEW
« no previous file with comments | « third_party/sqlite/src/src/test_mutex.c ('k') | third_party/sqlite/src/src/test_osinst.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698