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

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

Issue 14651031: Convert degenerate memcmp() to strncmp() in SQLite TimeMachine patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/mac_time_machine.patch ('k') | no next file » | 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 ** 2001 September 15 2 ** 2001 September 15
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 5191 matching lines...) Expand 10 before | Expand all | Expand 10 after
5202 ); 5202 );
5203 #else 5203 #else
5204 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0); 5204 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0);
5205 #endif 5205 #endif
5206 #if defined(__APPLE__) 5206 #if defined(__APPLE__)
5207 /* Set the TimeMachine exclusion metadata for the journal if it has 5207 /* Set the TimeMachine exclusion metadata for the journal if it has
5208 ** been set for the database. Only do this for unix-type vfs 5208 ** been set for the database. Only do this for unix-type vfs
5209 ** implementations. */ 5209 ** implementations. */
5210 if( rc==SQLITE_OK && pPager->zFilename!=NULL 5210 if( rc==SQLITE_OK && pPager->zFilename!=NULL
5211 && strlen(pPager->zFilename)>0 5211 && strlen(pPager->zFilename)>0
5212 && memcmp(pVfs->zName, "unix", 4)==0 5212 && strncmp(pVfs->zName, "unix", 4)==0
5213 && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){ 5213 && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){
5214 CFURLRef database = create_cfurl_from_cstring(pPager->zFilename); 5214 CFURLRef database = create_cfurl_from_cstring(pPager->zFilename);
5215 if( CSBackupIsItemExcluded(database, NULL) ){ 5215 if( CSBackupIsItemExcluded(database, NULL) ){
5216 CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal); 5216 CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal);
5217 /* Ignore errors from the following exclusion call. */ 5217 /* Ignore errors from the following exclusion call. */
5218 CSBackupSetItemExcluded(journal, TRUE, FALSE); 5218 CSBackupSetItemExcluded(journal, TRUE, FALSE);
5219 CFRelease(journal); 5219 CFRelease(journal);
5220 } 5220 }
5221 CFRelease(database); 5221 CFRelease(database);
5222 } 5222 }
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
6961 void *sqlite3PagerCodec(PgHdr *pPg){ 6961 void *sqlite3PagerCodec(PgHdr *pPg){
6962 void *aData = 0; 6962 void *aData = 0;
6963 CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData); 6963 CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData);
6964 return aData; 6964 return aData;
6965 } 6965 }
6966 #endif /* SQLITE_HAS_CODEC */ 6966 #endif /* SQLITE_HAS_CODEC */
6967 6967
6968 #endif /* !SQLITE_OMIT_WAL */ 6968 #endif /* !SQLITE_OMIT_WAL */
6969 6969
6970 #endif /* SQLITE_OMIT_DISKIO */ 6970 #endif /* SQLITE_OMIT_DISKIO */
OLDNEW
« no previous file with comments | « third_party/sqlite/mac_time_machine.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698