diff options
author | dan <dan@noemail.net> | 2014-11-15 20:07:31 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2014-11-15 20:07:31 +0000 |
commit | 48d70140678b2fb74f7afddb8185e4becc195bb8 (patch) | |
tree | 6b2fa49b35ce27ccc3b87c24ee2a29f21334b1d2 /src | |
parent | 4aee5dff8320423b7e810f0a1912758be245c1c1 (diff) | |
download | sqlite-48d70140678b2fb74f7afddb8185e4becc195bb8.tar.gz sqlite-48d70140678b2fb74f7afddb8185e4becc195bb8.zip |
Fix the customization interfaces so that they match the documentation.
FossilOrigin-Name: fba0b5fc7eead07a4853e78e02d788e7c714f6cd
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 10 | ||||
-rw-r--r-- | src/test_config.c | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 5d894b2ea..d0ecbb56b 100644 --- a/src/main.c +++ b/src/main.c @@ -19,6 +19,9 @@ #ifdef SQLITE_ENABLE_FTS3 # include "fts3.h" #endif +#ifdef SQLITE_ENABLE_FTS5 +int sqlite3Fts5Init(sqlite3*); +#endif #ifdef SQLITE_ENABLE_RTREE # include "rtree.h" #endif @@ -2609,7 +2612,12 @@ static int openDatabase( #ifdef SQLITE_ENABLE_FTS3 if( !db->mallocFailed && rc==SQLITE_OK ){ rc = sqlite3Fts3Init(db); - if( rc==SQLITE_OK ) rc = sqlite3Fts5Init(db); + } +#endif + +#ifdef SQLITE_ENABLE_FTS5 + if( !db->mallocFailed && rc==SQLITE_OK ){ + rc = sqlite3Fts5Init(db); } #endif diff --git a/src/test_config.c b/src/test_config.c index bf8afd8e6..2f8bed447 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -330,6 +330,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_ENABLE_FTS5 + Tcl_SetVar2(interp, "sqlite_options", "fts5", "1", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "fts5", "0", TCL_GLOBAL_ONLY); +#endif + #if defined(SQLITE_ENABLE_FTS3) && defined(SQLITE_ENABLE_FTS4_UNICODE61) Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "1", TCL_GLOBAL_ONLY); #else |