Chromium Code Reviews

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

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « third_party/sqlite/src/ext/fts1/ft_hash.h ('k') | third_party/sqlite/src/ext/fts1/fts1_hash.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3317 matching lines...)
3328 /* xRename */ fulltextRename, 3328 /* xRename */ fulltextRename,
3329 }; 3329 };
3330 3330
3331 int sqlite3Fts1Init(sqlite3 *db){ 3331 int sqlite3Fts1Init(sqlite3 *db){
3332 sqlite3_overload_function(db, "snippet", -1); 3332 sqlite3_overload_function(db, "snippet", -1);
3333 sqlite3_overload_function(db, "offsets", -1); 3333 sqlite3_overload_function(db, "offsets", -1);
3334 return sqlite3_create_module(db, "fts1", &fulltextModule, 0); 3334 return sqlite3_create_module(db, "fts1", &fulltextModule, 0);
3335 } 3335 }
3336 3336
3337 #if !SQLITE_CORE 3337 #if !SQLITE_CORE
3338 int sqlite3_extension_init(sqlite3 *db, char **pzErrMsg, 3338 #ifdef _WIN32
3339 const sqlite3_api_routines *pApi){ 3339 __declspec(dllexport)
3340 #endif
3341 int sqlite3_fts1_init(sqlite3 *db, char **pzErrMsg,
3342 const sqlite3_api_routines *pApi){
3340 SQLITE_EXTENSION_INIT2(pApi) 3343 SQLITE_EXTENSION_INIT2(pApi)
3341 return sqlite3Fts1Init(db); 3344 return sqlite3Fts1Init(db);
3342 } 3345 }
3343 #endif 3346 #endif
3344 3347
3345 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1) */ 3348 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1) */
OLDNEW
« no previous file with comments | « third_party/sqlite/src/ext/fts1/ft_hash.h ('k') | third_party/sqlite/src/ext/fts1/fts1_hash.h » ('j') | no next file with comments »

Powered by Google App Engine