From: dan Date: Fri, 6 Aug 2010 14:37:13 +0000 (+0000) Subject: Fix some problems with running test scripts with the inmemory_journal permutation. X-Git-Tag: version-3.7.2~53^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f7b8d62606b14f23dac84c68bffd6c52dc939b6;p=thirdparty%2Fsqlite.git Fix some problems with running test scripts with the inmemory_journal permutation. FossilOrigin-Name: 7bd8ba084e75bcd5c744e1d4a1812df3a4d91887 --- diff --git a/manifest b/manifest index dc83753762..f3b4bb44fc 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\strunk\schanges\sinto\sexperimental\sbranch. -D 2010-08-06T13:53:10 +C Fix\ssome\sproblems\swith\srunning\stest\sscripts\swith\sthe\sinmemory_journal\spermutation. +D 2010-08-06T14:37:13 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -330,7 +330,7 @@ F test/createtab.test 199cf68f44e5d9e87a0b8afc7130fdeb4def3272 F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c F test/ctime.test 7bd009071e242aac4f18521581536b652b789a47 F test/date.test 6354b883f922c38046a8efbad187cc95df6da023 -F test/dbstatus.test f3c88a3f8d15716e6ae73567a78ee96420c294a3 +F test/dbstatus.test ba072efbd7fcbeb4da324bfbdf1e596d994c159e F test/default.test 6faf23ccb300114924353007795aa9a8ec0aa9dc F test/delete.test f7629d9eb245dfca170169cc5c7a735dec34aeb4 F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa @@ -351,7 +351,7 @@ F test/exclusive.test b1f9012cabc124af947165d15ffa62ad20f63db8 F test/exclusive2.test fcbb1c9ca9739292a0a22a3763243ad6d868086b F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7 F test/expr.test 9f521ae22f00e074959f72ce2e55d46b9ed23f68 -F test/fallocate.test 56242d30325fa451247d13e103cf1c357751a066 +F test/fallocate.test 43dc34b8c24be6baffadc3b4401ee15710ce83c6 F test/filectrl.test 97003734290887566e01dded09dc9e99cb937e9e F test/filefmt.test f77c92141960b7933bc6691631d2ad62257ef40a F test/fkey1.test 01c7de578e11747e720c2d9aeef27f239853c4da @@ -843,7 +843,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 5f4c17a33fd442d66c1bf75af9b21954f6906897 698fba826e40ce6414cf6c261441d68b174c1637 -R 608fe42d5e0f4b194d191a9617ba7a7e +P aef6698c732f3f9e46986f53e63ca2bdf5f7d208 +R d400d2e52912473cf6c4aca53a46678c U dan -Z cb0c5df5af28e7e96ef8d49f9e0760f1 +Z e0e135b259997ce301d4de7d751dee90 diff --git a/manifest.uuid b/manifest.uuid index ec439f5a86..9840d1e499 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -aef6698c732f3f9e46986f53e63ca2bdf5f7d208 \ No newline at end of file +7bd8ba084e75bcd5c744e1d4a1812df3a4d91887 \ No newline at end of file diff --git a/test/dbstatus.test b/test/dbstatus.test index 46291b1ce5..53d3d66f0a 100644 --- a/test/dbstatus.test +++ b/test/dbstatus.test @@ -55,6 +55,12 @@ proc lookaside {db} { # foreach ::lookaside_buffer_size {0 64 120} { + # Do not run any of these tests if there is SQL configured to run + # as part of the [sqlite3] command. This prevents the script from + # configuring the size of the lookaside buffer after [sqlite3] has + # returned. + if {[presql] != ""} break + #------------------------------------------------------------------------- # Tests for SQLITE_DBSTATUS_SCHEMA_USED. # @@ -317,6 +323,7 @@ foreach ::lookaside_buffer_size {0 64 120} { # implementation using sqlite3_mprintf() is technically considered # external and so is not counted as "statement memory". # +puts "$nStmt1 $nFree" if {[string match *x $tn]} { do_test dbstatus-3.$tn.bx { expr $nStmt1<=$nFree } {1} } else { diff --git a/test/fallocate.test b/test/fallocate.test index ab41fe0a23..05aa2a81e5 100644 --- a/test/fallocate.test +++ b/test/fallocate.test @@ -59,7 +59,11 @@ do_test fallocate-1.6 { # do_test fallocate-1.7 { execsql { BEGIN; INSERT INTO t1 VALUES(1, 2); } - hexio_get_int [hexio_read test.db-journal 16 4] + if {[permutation] != "inmemory_journal"} { + hexio_get_int [hexio_read test.db-journal 16 4] + } else { + set {} 1024 + } } {1024} do_test fallocate-1.8 { execsql { COMMIT } } {} @@ -68,72 +72,73 @@ do_test fallocate-1.8 { execsql { COMMIT } } {} # The following tests - fallocate-2.* - test that things work in WAL # mode as well. # -set skipwaltests [expr {[permutation]=="journaltest"}] +set skipwaltests [expr { + [permutation]=="journaltest" || [permutation]=="inmemory_journal" +}] ifcapable !wal { set skipwaltests 1 } if {!$skipwaltests} { -db close -file delete -force test.db -sqlite3 db test.db -file_control_chunksize_test db main [expr 32*1024] - -do_test fallocate-2.1 { - execsql { - PRAGMA page_size = 1024; - PRAGMA journal_mode = WAL; - CREATE TABLE t1(a, b); - } - file size test.db -} [expr 32*1024] - -do_test fallocate-2.2 { - execsql { INSERT INTO t1 VALUES(1, zeroblob(35*1024)) } - execsql { PRAGMA wal_checkpoint } - file size test.db -} [expr 64*1024] - -do_test fallocate-2.3 { - execsql { DELETE FROM t1 } - execsql { VACUUM } - file size test.db -} [expr 64*1024] - -do_test fallocate-2.4 { - execsql { PRAGMA wal_checkpoint } - file size test.db -} [expr 32*1024] - -do_test fallocate-2.5 { - execsql { - INSERT INTO t1 VALUES(2, randomblob(35*1024)); - PRAGMA wal_checkpoint; - INSERT INTO t1 VALUES(3, randomblob(128)); - DELETE FROM t1 WHERE a = 2; - VACUUM; - } - file size test.db -} [expr 64*1024] - -do_test fallocate-2.6 { - sqlite3 db2 test.db - execsql { BEGIN ; SELECT count(a) FROM t1 } db2 - execsql { - INSERT INTO t1 VALUES(4, randomblob(128)); - PRAGMA wal_checkpoint; - } - file size test.db -} [expr 64*1024] - -do_test fallocate-2.7 { - execsql { SELECT count(b) FROM t1 } db2 -} {1} - -do_test fallocate-2.8 { - execsql { COMMIT } db2 - execsql { PRAGMA wal_checkpoint } - file size test.db -} [expr 32*1024] - + db close + file delete -force test.db + sqlite3 db test.db + file_control_chunksize_test db main [expr 32*1024] + + do_test fallocate-2.1 { + execsql { + PRAGMA page_size = 1024; + PRAGMA journal_mode = WAL; + CREATE TABLE t1(a, b); + } + file size test.db + } [expr 32*1024] + + do_test fallocate-2.2 { + execsql { INSERT INTO t1 VALUES(1, zeroblob(35*1024)) } + execsql { PRAGMA wal_checkpoint } + file size test.db + } [expr 64*1024] + + do_test fallocate-2.3 { + execsql { DELETE FROM t1 } + execsql { VACUUM } + file size test.db + } [expr 64*1024] + + do_test fallocate-2.4 { + execsql { PRAGMA wal_checkpoint } + file size test.db + } [expr 32*1024] + + do_test fallocate-2.5 { + execsql { + INSERT INTO t1 VALUES(2, randomblob(35*1024)); + PRAGMA wal_checkpoint; + INSERT INTO t1 VALUES(3, randomblob(128)); + DELETE FROM t1 WHERE a = 2; + VACUUM; + } + file size test.db + } [expr 64*1024] + + do_test fallocate-2.6 { + sqlite3 db2 test.db + execsql { BEGIN ; SELECT count(a) FROM t1 } db2 + execsql { + INSERT INTO t1 VALUES(4, randomblob(128)); + PRAGMA wal_checkpoint; + } + file size test.db + } [expr 64*1024] + + do_test fallocate-2.7 { + execsql { SELECT count(b) FROM t1 } db2 + } {1} + + do_test fallocate-2.8 { + execsql { COMMIT } db2 + execsql { PRAGMA wal_checkpoint } + file size test.db + } [expr 32*1024] }