diff options
Diffstat (limited to 'src/test1.c')
-rw-r--r-- | src/test1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test1.c b/src/test1.c index bc8f389db..0f139ceba 100644 --- a/src/test1.c +++ b/src/test1.c @@ -2257,6 +2257,27 @@ static int SQLITE_TCLAPI test_config_sqllog( #endif /* +** Usage: sqlite3_config_sorterref +** +** Set the SQLITE_CONFIG_SORTERREF_SIZE configuration option +*/ +static int SQLITE_TCLAPI test_config_sorterref( + void * clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[] +){ + int iVal; + if( objc!=2 ){ + Tcl_WrongNumArgs(interp, 1, objv, "NBYTE"); + return TCL_ERROR; + } + if( Tcl_GetIntFromObj(interp, objv[1], &iVal) ) return TCL_ERROR; + sqlite3_config(SQLITE_CONFIG_SORTERREF_SIZE, iVal); + return TCL_OK; +} + +/* ** Usage: vfs_current_time_int64 ** ** Return the value returned by the default VFS's xCurrentTimeInt64 method. @@ -7751,6 +7772,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ { "sqlite3_delete_database", test_delete_database, 0 }, { "atomic_batch_write", test_atomic_batch_write, 0 }, { "sqlite3_mmap_warm", test_mmap_warm, 0 }, + { "sqlite3_config_sorterref", test_config_sorterref, 0 }, }; static int bitmask_size = sizeof(Bitmask)*8; static int longdouble_size = sizeof(LONGDOUBLE_TYPE); |