diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-05-26 18:41:54 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-05-26 18:41:54 +0000 |
commit | ebaecc148f39320fe70eda47b51e2133709ea2bd (patch) | |
tree | a47a9599969173b46c597bdf71bc2c0772644029 /src | |
parent | 02a50b709c29c1bbf109510f36302205d621088f (diff) | |
download | sqlite-ebaecc148f39320fe70eda47b51e2133709ea2bd.tar.gz sqlite-ebaecc148f39320fe70eda47b51e2133709ea2bd.zip |
Import 'rtree' extension. (CVS 5159)
FossilOrigin-Name: b104dcd6adadbd3fe15a348fe9d4d290119e139e
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 10 | ||||
-rw-r--r-- | src/test_config.c | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 00ea04d0d..ecdc8e961 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.440 2008/05/22 13:56:17 danielk1977 Exp $ +** $Id: main.c,v 1.441 2008/05/26 18:41:54 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1184,6 +1184,14 @@ static int openDatabase( rc = sqlite3IcuInit(db); } #endif + +#ifdef SQLITE_ENABLE_RTREE + if( !db->mallocFailed && rc==SQLITE_OK){ + extern int sqlite3RtreeInit(sqlite3*); + rc = sqlite3RtreeInit(db); + } +#endif + sqlite3Error(db, rc, 0); /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking diff --git a/src/test_config.c b/src/test_config.c index a82f5af11..b1f23b941 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -16,7 +16,7 @@ ** The focus of this file is providing the TCL testing layer ** access to compile-time constants. ** -** $Id: test_config.c,v 1.25 2008/04/14 01:00:58 drh Exp $ +** $Id: test_config.c,v 1.26 2008/05/26 18:41:54 danielk1977 Exp $ */ #include "sqliteLimit.h" @@ -338,6 +338,12 @@ Tcl_SetVar2(interp, "sqlite_options", "long_double", Tcl_SetVar2(interp, "sqlite_options", "reindex", "1", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_ENABLE_RTREE + Tcl_SetVar2(interp, "sqlite_options", "rtree", "1", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "rtree", "0", TCL_GLOBAL_ONLY); +#endif + #ifdef SQLITE_OMIT_SCHEMA_PRAGMAS Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "0", TCL_GLOBAL_ONLY); #else |