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

Side by Side Diff: third_party/sqlite/mac_time_machine.patch

Issue 7511011: Only do the exclude-journal-from-Time-Machine-if-the-database-is-excluded thing for unix-flavored (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/amalgamation/sqlite3.c ('k') | third_party/sqlite/src/src/pager.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 Index: src/sqliteInt.h 1 Index: src/sqliteInt.h
2 =================================================================== 2 ===================================================================
3 --- src/sqliteInt.h (revision 87306) 3 --- src/sqliteInt.h (revision 87306)
4 +++ src/sqliteInt.h (working copy) 4 +++ src/sqliteInt.h (working copy)
5 @@ -2522,6 +2522,16 @@ 5 @@ -2522,6 +2522,16 @@
6 #endif 6 #endif
7 7
8 /* 8 /*
9 +** The CoreServices.h and CoreFoundation.h headers are needed for excluding a 9 +** The CoreServices.h and CoreFoundation.h headers are needed for excluding a
10 +** -journal file from Time Machine backups when its associated database has 10 +** -journal file from Time Machine backups when its associated database has
(...skipping 27 matching lines...) Expand all
38 + urlString, kCFURLPOSIXPathStyle, FALSE); 38 + urlString, kCFURLPOSIXPathStyle, FALSE);
39 + CFRelease(urlString); 39 + CFRelease(urlString);
40 + return urlRef; 40 + return urlRef;
41 +} 41 +}
42 +#endif 42 +#endif
43 + 43 +
44 +/* 44 +/*
45 ** This function is called at the start of every write transaction. 45 ** This function is called at the start of every write transaction.
46 ** There must already be a RESERVED or EXCLUSIVE lock on the database 46 ** There must already be a RESERVED or EXCLUSIVE lock on the database
47 ** file when this routine is called. 47 ** file when this routine is called.
48 @@ -5189,6 +5203,21 @@ 48 @@ -5189,6 +5203,24 @@
49 #else 49 #else
50 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0); 50 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0);
51 #endif 51 #endif
52 +#if defined(__APPLE__) 52 +#if defined(__APPLE__)
53 + /* Set the TimeMachine exclusion metadata for the journal if it has 53 + /* Set the TimeMachine exclusion metadata for the journal if it has
54 + ** been set for the database. */ 54 + ** been set for the database. Only do this for unix-type vfs
55 + ** implementations. */
55 + if( rc==SQLITE_OK && pPager->zFilename!=NULL 56 + if( rc==SQLITE_OK && pPager->zFilename!=NULL
56 + && strlen(pPager->zFilename)>0 ){ 57 + && strlen(pPager->zFilename)>0
58 + && memcmp(pVfs->zName, "unix", 4)==0
59 + && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){
57 + CFURLRef database = create_cfurl_from_cstring(pPager->zFilename); 60 + CFURLRef database = create_cfurl_from_cstring(pPager->zFilename);
58 + if( CSBackupIsItemExcluded(database, NULL) ){ 61 + if( CSBackupIsItemExcluded(database, NULL) ){
59 + CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal); 62 + CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal);
60 + /* Ignore errors from the following exclusion call. */ 63 + /* Ignore errors from the following exclusion call. */
61 + CSBackupSetItemExcluded(journal, TRUE, FALSE); 64 + CSBackupSetItemExcluded(journal, TRUE, FALSE);
62 + CFRelease(journal); 65 + CFRelease(journal);
63 + } 66 + }
64 + CFRelease(database); 67 + CFRelease(database);
65 + } 68 + }
66 +#endif 69 +#endif
(...skipping 24 matching lines...) Expand all
91 } 94 }
92 @@ -162,7 +162,7 @@ 95 @@ -162,7 +162,7 @@
93 char x = *z; 96 char x = *z;
94 if( x==0 ) return 0; 97 if( x==0 ) return 0;
95 assert( x>='a' && x<='z' ); 98 assert( x>='a' && x<='z' );
96 - j = cType[x-'a']; 99 - j = cType[x-'a'];
97 + j = vOrCType[x-'a']; 100 + j = vOrCType[x-'a'];
98 if( j<2 ) return 1-j; 101 if( j<2 ) return 1-j;
99 return isConsonant(z + 1); 102 return isConsonant(z + 1);
100 } 103 }
OLDNEW
« no previous file with comments | « third_party/sqlite/amalgamation/sqlite3.c ('k') | third_party/sqlite/src/src/pager.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698