| OLD | NEW |
| 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...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) */ |
| OLD | NEW |