diff options
author | drh <drh@noemail.net> | 2012-09-17 20:44:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-09-17 20:44:46 +0000 |
commit | de9a7b8a942d1b4066abdb03e661b3bc174d9d73 (patch) | |
tree | cb56e4d03471c992cf36a8240d286862c7864d0a /src/test_malloc.c | |
parent | ee4b21e9f3b775b4e20f2b71eff2b8bf052d2518 (diff) | |
download | sqlite-de9a7b8a942d1b4066abdb03e661b3bc174d9d73.tar.gz sqlite-de9a7b8a942d1b4066abdb03e661b3bc174d9d73.zip |
Add the ability to disable the covering-index-scan optimization at compile-time,
start-time, or at run-time. Add test cases to check this configurability.
FossilOrigin-Name: ccb8ecc30c8e6c7760131250297c2e452bbac43b
Diffstat (limited to 'src/test_malloc.c')
-rw-r--r-- | src/test_malloc.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test_malloc.c b/src/test_malloc.c index f52894d9e..e1420de64 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -1198,6 +1198,35 @@ static int test_config_uri( } /* +** Usage: sqlite3_config_cis BOOLEAN +** +** Enables or disables the use of the covering-index scan optimization. +** SQLITE_CONFIG_COVERING_INDEX_SCAN. +*/ +static int test_config_cis( + void * clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[] +){ + int rc; + int bUseCis; + + if( objc!=2 ){ + Tcl_WrongNumArgs(interp, 1, objv, "BOOL"); + return TCL_ERROR; + } + if( Tcl_GetBooleanFromObj(interp, objv[1], &bUseCis) ){ + return TCL_ERROR; + } + + rc = sqlite3_config(SQLITE_CONFIG_COVERING_INDEX_SCAN, bUseCis); + Tcl_SetResult(interp, (char *)sqlite3TestErrorName(rc), TCL_VOLATILE); + + return TCL_OK; +} + +/* ** Usage: sqlite3_dump_memsys3 FILENAME ** sqlite3_dump_memsys5 FILENAME ** @@ -1447,6 +1476,7 @@ int Sqlitetest_malloc_Init(Tcl_Interp *interp){ { "sqlite3_config_lookaside", test_config_lookaside ,0 }, { "sqlite3_config_error", test_config_error ,0 }, { "sqlite3_config_uri", test_config_uri ,0 }, + { "sqlite3_config_cis", test_config_cis ,0 }, { "sqlite3_db_config_lookaside",test_db_config_lookaside ,0 }, { "sqlite3_dump_memsys3", test_dump_memsys3 ,3 }, { "sqlite3_dump_memsys5", test_dump_memsys3 ,5 }, |