Index: src/test_malloc.c ================================================================== --- src/test_malloc.c +++ src/test_malloc.c @@ -11,11 +11,11 @@ ************************************************************************* ** ** This file contains code used to implement test interfaces to the ** memory allocation subsystem. ** -** $Id: test_malloc.c,v 1.48 2008/10/10 17:41:29 drh Exp $ +** $Id: test_malloc.c,v 1.49 2008/10/15 11:43:55 danielk1977 Exp $ */ #include "sqliteInt.h" #include "tcl.h" #include #include @@ -999,18 +999,26 @@ int objc, Tcl_Obj *CONST objv[] ){ int rc; int sz, cnt; + Tcl_Obj *pRet; if( objc!=3 ){ Tcl_WrongNumArgs(interp, 1, objv, "SIZE COUNT"); return TCL_ERROR; } if( Tcl_GetIntFromObj(interp, objv[1], &sz) ) return TCL_ERROR; if( Tcl_GetIntFromObj(interp, objv[2], &cnt) ) return TCL_ERROR; + pRet = Tcl_NewObj(); + Tcl_ListObjAppendElement( + interp, pRet, Tcl_NewIntObj(sqlite3GlobalConfig.szLookaside) + ); + Tcl_ListObjAppendElement( + interp, pRet, Tcl_NewIntObj(sqlite3GlobalConfig.nLookaside) + ); rc = sqlite3_config(SQLITE_CONFIG_LOOKASIDE, sz, cnt); - Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); + Tcl_SetObjResult(interp, pRet); return TCL_OK; } /* Index: test/speed1.test ================================================================== --- test/speed1.test +++ test/speed1.test @@ -9,16 +9,16 @@ # #************************************************************************* # This file implements regression tests for SQLite library. The # focus of this script is measuring executing speed. # -# $Id: speed1.test,v 1.9 2008/07/30 13:15:46 drh Exp $ +# $Id: speed1.test,v 1.10 2008/10/15 11:43:55 danielk1977 Exp $ # sqlite3_shutdown #sqlite3_config_scratch 29000 1 -sqlite3_config_lookaside 1000 300 +set old_lookaside [sqlite3_config_lookaside 1000 300] #sqlite3_config_pagecache 1024 10000 set testdir [file dirname $argv0] source $testdir/tester.tcl speed_trial_init speed1 @@ -288,6 +288,9 @@ do_test speed1-1.2 { db one {SELECT count(*) FROM t1} } 10000 speed_trial_summary speed1 +db close +sqlite3_shutdown +eval sqlite3_config_lookaside $old_lookaside finish_test Index: test/speed1p.test ================================================================== --- test/speed1p.test +++ test/speed1p.test @@ -11,16 +11,16 @@ # This file implements regression tests for SQLite library. The # focus of this script is measuring executing speed. # # This is a copy of speed1.test modified to user prepared statements. # -# $Id: speed1p.test,v 1.5 2008/07/30 13:15:46 drh Exp $ +# $Id: speed1p.test,v 1.6 2008/10/15 11:43:55 danielk1977 Exp $ # sqlite3_shutdown #sqlite3_config_scratch 29000 1 -sqlite3_config_lookaside 2048 300 +set old_lookaside [sqlite3_config_lookaside 2048 300] #sqlite3_config_pagecache 1024 11000 set testdir [file dirname $argv0] source $testdir/tester.tcl speed_trial_init speed1 @@ -324,11 +324,10 @@ (SELECT rowid FROM t1 ORDER BY random() LIMIT 20000) } do_test speed1p-1.1 { db one {SELECT count(*) FROM t1} } 30000 - # Delete 20000 more rows at random from the table. # speed_trial speed1p-random-del2 20000 row { DELETE FROM t1 WHERE rowid IN @@ -337,6 +336,9 @@ do_test speed1p-1.2 { db one {SELECT count(*) FROM t1} } 10000 speed_trial_summary speed1 +db close +sqlite3_shutdown +eval sqlite3_config_lookaside $old_lookaside finish_test