]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix some problems with running test scripts with the inmemory_journal permutation.
authordan <dan@noemail.net>
Fri, 6 Aug 2010 14:37:13 +0000 (14:37 +0000)
committerdan <dan@noemail.net>
Fri, 6 Aug 2010 14:37:13 +0000 (14:37 +0000)
FossilOrigin-Name: 7bd8ba084e75bcd5c744e1d4a1812df3a4d91887

manifest
manifest.uuid
test/dbstatus.test
test/fallocate.test

index dc83753762c21fe2a97d3eb11b1291449453d5a8..f3b4bb44fc2380a6508d10ca06ee7888b25d2ef1 100644 (file)
--- 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
index ec439f5a8633ef9913ed69c04691da98a38b23ee..9840d1e499447d616361e1ca47ccaa935e849176 100644 (file)
@@ -1 +1 @@
-aef6698c732f3f9e46986f53e63ca2bdf5f7d208
\ No newline at end of file
+7bd8ba084e75bcd5c744e1d4a1812df3a4d91887
\ No newline at end of file
index 46291b1ce55f054cae3c10cdd3cbe81d8783b99b..53d3d66f0a0cc92fcfafe5e4158e36c07ce5eaf6 100644 (file)
@@ -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 {
index ab41fe0a23ee69705bb99c0feae45b08b181c19a..05aa2a81e5840ff02d19803147d134d8f1e745e8 100644 (file)
@@ -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]
 }