diff options
author | drh <drh@noemail.net> | 2012-09-28 13:05:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-09-28 13:05:48 +0000 |
commit | c4645dacfb435002911b187b474fa0788db9cde0 (patch) | |
tree | e757051bb0f952d0cb149b62ff6bdbbfdb99eb82 /src/test_malloc.c | |
parent | 40eaa08620a75a29f4849cd3572e64feaafce5ec (diff) | |
parent | f784c1ede942139d136f7c00a1d8fb30a4a31f18 (diff) | |
download | sqlite-c4645dacfb435002911b187b474fa0788db9cde0.tar.gz sqlite-c4645dacfb435002911b187b474fa0788db9cde0.zip |
Merge the latest trunk changes (especially "PRAGMA busy_timeout" and the
ORDER BY query planner optimizations) into the sessions branch.
FossilOrigin-Name: 6ca8eae1f89d19ee23cbc3a869d85b57d29b4a7d
Diffstat (limited to 'src/test_malloc.c')
-rw-r--r-- | src/test_malloc.c | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/src/test_malloc.c b/src/test_malloc.c index 09b8f738e..e1420de64 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -1094,9 +1094,7 @@ static int test_db_config_lookaside( } /* -** Usage: -** -** sqlite3_config_heap NBYTE NMINALLOC +** Usage: sqlite3_config_heap NBYTE NMINALLOC */ static int test_config_heap( void * clientData, @@ -1133,7 +1131,7 @@ static int test_config_heap( } /* -** tclcmd: sqlite3_config_error [DB] +** Usage: sqlite3_config_error [DB] ** ** Invoke sqlite3_config() or sqlite3_db_config() with invalid ** opcodes and verify that they return errors. @@ -1171,10 +1169,10 @@ static int test_config_error( } /* -** tclcmd: sqlite3_config_uri BOOLEAN +** Usage: sqlite3_config_uri BOOLEAN ** -** Invoke sqlite3_config() or sqlite3_db_config() with invalid -** opcodes and verify that they return errors. +** Enables or disables interpretation of URI parameters by default using +** SQLITE_CONFIG_URI. */ static int test_config_uri( void * clientData, @@ -1200,10 +1198,37 @@ static int test_config_uri( } /* -** Usage: +** Usage: sqlite3_config_cis BOOLEAN ** -** sqlite3_dump_memsys3 FILENAME -** sqlite3_dump_memsys5 FILENAME +** 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 ** ** Write a summary of unfreed memsys3 allocations to FILENAME. */ @@ -1451,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 }, |