| OLD | NEW |
| 1 /* fts2 has a design flaw which can lead to database corruption (see | 1 /* fts2 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 fts2 is safe, | 3 ** fts3 (or higher). If you believe that your use of fts2 is safe, |
| 4 ** add -DSQLITE_ENABLE_BROKEN_FTS2=1 to your CFLAGS. | 4 ** add -DSQLITE_ENABLE_BROKEN_FTS2=1 to your CFLAGS. |
| 5 */ | 5 */ |
| 6 #if (!defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2)) \ | 6 #if (!defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2)) \ |
| 7 && !defined(SQLITE_ENABLE_BROKEN_FTS2) | 7 && !defined(SQLITE_ENABLE_BROKEN_FTS2) |
| 8 #error fts2 has a design flaw and has been deprecated. | 8 #error fts2 has a design flaw and has been deprecated. |
| 9 #endif | 9 #endif |
| 10 /* The flaw is that fts2 uses the content table's unaliased rowid as | 10 /* The flaw is that fts2 uses the content table's unaliased rowid as |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 #include <assert.h> | 319 #include <assert.h> |
| 320 #include <stdlib.h> | 320 #include <stdlib.h> |
| 321 #include <stdio.h> | 321 #include <stdio.h> |
| 322 #include <string.h> | 322 #include <string.h> |
| 323 #include <ctype.h> | 323 #include <ctype.h> |
| 324 | 324 |
| 325 #include "fts2.h" | 325 #include "fts2.h" |
| 326 #include "fts2_hash.h" | 326 #include "fts2_hash.h" |
| 327 #include "fts2_tokenizer.h" | 327 #include "fts2_tokenizer.h" |
| 328 #include "sqlite3.h" | 328 #include "sqlite3.h" |
| 329 #include "sqlite3ext.h" | 329 #ifndef SQLITE_CORE |
| 330 SQLITE_EXTENSION_INIT1 | 330 # include "sqlite3ext.h" |
| 331 SQLITE_EXTENSION_INIT1 |
| 332 #endif |
| 331 | 333 |
| 332 | 334 |
| 333 /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it | 335 /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it |
| 334 ** would be nice to order the file better, perhaps something along the | 336 ** would be nice to order the file better, perhaps something along the |
| 335 ** lines of: | 337 ** lines of: |
| 336 ** | 338 ** |
| 337 ** - utility functions | 339 ** - utility functions |
| 338 ** - table setup functions | 340 ** - table setup functions |
| 339 ** - table update functions | 341 ** - table update functions |
| 340 ** - table query functions | 342 ** - table query functions |
| (...skipping 6939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7280 sqlite3 *db, | 7282 sqlite3 *db, |
| 7281 char **pzErrMsg, | 7283 char **pzErrMsg, |
| 7282 const sqlite3_api_routines *pApi | 7284 const sqlite3_api_routines *pApi |
| 7283 ){ | 7285 ){ |
| 7284 SQLITE_EXTENSION_INIT2(pApi) | 7286 SQLITE_EXTENSION_INIT2(pApi) |
| 7285 return sqlite3Fts2Init(db); | 7287 return sqlite3Fts2Init(db); |
| 7286 } | 7288 } |
| 7287 #endif | 7289 #endif |
| 7288 | 7290 |
| 7289 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2) */ | 7291 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2) */ |
| OLD | NEW |