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

Side by Side Diff: third_party/sqlite/ext/fts1/fts1.c

Issue 186011: Merge 25141 - Fix issue 15261: Crash in history::TextDatabase::GetTextMatches... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 3 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/README.chromium ('k') | third_party/sqlite/ext/fts1/fts1_tokenizer1.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/third_party/sqlite/ext/fts1/fts1.c:r69-2775
Merged /trunk/src/third_party/sqlite/ext/fts1/fts1.c:r25141
OLDNEW
1 /* fts1 has a design flaw which can lead to database corruption (see 1 /* fts1 has a design flaw which can lead to database corruption (see
2 ** below). It is recommended not to use it any longer, instead use 2 ** below). It is recommended not to use it any longer, instead use
3 ** fts3 (or higher). If you believe that your use of fts1 is safe, 3 ** fts3 (or higher). If you believe that your use of fts1 is safe,
4 ** add -DSQLITE_ENABLE_BROKEN_FTS1=1 to your CFLAGS. 4 ** add -DSQLITE_ENABLE_BROKEN_FTS1=1 to your CFLAGS.
5 */ 5 */
6 #if (!defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1)) \ 6 #if (!defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1)) \
7 && !defined(SQLITE_ENABLE_BROKEN_FTS1) 7 && !defined(SQLITE_ENABLE_BROKEN_FTS1)
8 #error fts1 has a design flaw and has been deprecated. 8 #error fts1 has a design flaw and has been deprecated.
9 #endif 9 #endif
10 /* The flaw is that fts1 uses the content table's unaliased rowid as 10 /* The flaw is that fts1 uses the content table's unaliased rowid as
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 */ 201 */
202 /* TODO(shess) The snippet-generation code should be using the 202 /* TODO(shess) The snippet-generation code should be using the
203 ** tokenizer-generated tokens rather than doing its own local 203 ** tokenizer-generated tokens rather than doing its own local
204 ** tokenization. 204 ** tokenization.
205 */ 205 */
206 /* TODO(shess) Is __isascii() a portable version of (c&0x80)==0? */ 206 /* TODO(shess) Is __isascii() a portable version of (c&0x80)==0? */
207 static int safe_isspace(char c){ 207 static int safe_isspace(char c){
208 return (c&0x80)==0 ? isspace(c) : 0; 208 return (c&0x80)==0 ? isspace(c) : 0;
209 } 209 }
210 static int safe_tolower(char c){ 210 static int safe_tolower(char c){
211 return (c&0x80)==0 ? tolower(c) : c; 211 return (c>='A' && c<='Z') ? (c-'A'+'a') : c;
212 } 212 }
213 static int safe_isalnum(char c){ 213 static int safe_isalnum(char c){
214 return (c&0x80)==0 ? isalnum(c) : 0; 214 return (c&0x80)==0 ? isalnum(c) : 0;
215 } 215 }
216 216
217 typedef enum DocListType { 217 typedef enum DocListType {
218 DL_DOCIDS, /* docids only */ 218 DL_DOCIDS, /* docids only */
219 DL_POSITIONS, /* docids + positions */ 219 DL_POSITIONS, /* docids + positions */
220 DL_POSITIONS_OFFSETS /* docids + positions + offsets */ 220 DL_POSITIONS_OFFSETS /* docids + positions + offsets */
221 } DocListType; 221 } DocListType;
(...skipping 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3332 3332
3333 #if !SQLITE_CORE 3333 #if !SQLITE_CORE
3334 int sqlite3_extension_init(sqlite3 *db, char **pzErrMsg, 3334 int sqlite3_extension_init(sqlite3 *db, char **pzErrMsg,
3335 const sqlite3_api_routines *pApi){ 3335 const sqlite3_api_routines *pApi){
3336 SQLITE_EXTENSION_INIT2(pApi) 3336 SQLITE_EXTENSION_INIT2(pApi)
3337 return sqlite3Fts1Init(db); 3337 return sqlite3Fts1Init(db);
3338 } 3338 }
3339 #endif 3339 #endif
3340 3340
3341 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1) */ 3341 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1) */
OLDNEW
« no previous file with comments | « third_party/sqlite/README.chromium ('k') | third_party/sqlite/ext/fts1/fts1_tokenizer1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698