]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a couple of problems with new test scripts causing the permutations test to fail.
authordan <dan@noemail.net>
Mon, 27 Jan 2014 16:35:15 +0000 (16:35 +0000)
committerdan <dan@noemail.net>
Mon, 27 Jan 2014 16:35:15 +0000 (16:35 +0000)
FossilOrigin-Name: 48d736c0ee1ac0879bd12d2f1901f208e87e538a

manifest
manifest.uuid
test/corruptH.test
test/pager4.test

index dfa2b5a9f99ecb8c2516c60658ab4fb3b078f150..295364ab481640ed7cae27e02f64da106077b638 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\ssome\srequirements\smarks\sto\sconform\swith\simprovements\nin\sthe\sdocumentation.
-D 2014-01-27T15:02:07.424
+C Fix\sa\scouple\sof\sproblems\swith\snew\stest\sscripts\scausing\sthe\spermutations\stest\sto\sfail.
+D 2014-01-27T16:35:15.028
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -406,7 +406,7 @@ F test/corruptD.test b3c205fac7952b1de645ce44bb02335cd9e3e040
 F test/corruptE.test 193b4ca4e927e77c1d5f4f56203ddc998432a7ee
 F test/corruptF.test be9fde98e4c93648f1ba52b74e5318edc8f59fe4
 F test/corruptG.test c150f156dace653c00a121ad0f5772a0568c41ba
-F test/corruptH.test 7c02f5d928499bc1b68ed4610bfc2c3f12565a35
+F test/corruptH.test 9d8186f6f8751efdfd445d8546fd98f073499039
 F test/count.test 42a251178e32f617eda33f76236a7f79825a50b5
 F test/coveridxscan.test cdb47d01acc4a634a34fd25abe85189e0d0f1e62
 F test/crash.test fb9dc4a02dcba30d4aa5c2c226f98b220b2b959f
@@ -728,7 +728,7 @@ F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
 F test/pager1.test 1acbdb14c5952a72dd43129cabdbf69aaa3ed1fa
 F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
 F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
-F test/pager4.test b40ecb4cc7dff957ee7916e41ab21d1ed702a642
+F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
 F test/pagerfault.test ae9ee0db5a30aecda9db8290ce3dd12e5f7bbaa1
 F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
 F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8
@@ -1152,7 +1152,7 @@ F tool/vdbe-compress.tcl 0cf56e9263a152b84da86e75a5c0cdcdb7a47891
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P ba8d2d507f82e2baaceadcf7ac6d71bb91f7e06b
-R 21ce223091709a0563d8c91470de6542
-U drh
-Z c5e028d1cb73bb521efada71d2fc02fb
+P be1acb610f7e594b417dd8409b7a7aa8f3af5f77
+R a3dad1261990ae79a41c0830e9dec218
+U dan
+Z bcec9d735db62477dd1be5e976533ffa
index eeb83b19fe871e5557ffb207394cfd7a3fbc6433..fc234874ae6ce32abadecad119b09f82bf107879 100644 (file)
@@ -1 +1 @@
-be1acb610f7e594b417dd8409b7a7aa8f3af5f77
\ No newline at end of file
+48d736c0ee1ac0879bd12d2f1901f208e87e538a
\ No newline at end of file
index 875a92f50485df17ed8f4fbc75de4c3d24b130f2..775c30d2a17c2eba7acdc18801158a931c5a0ee0 100644 (file)
@@ -96,8 +96,31 @@ do_test 2.2 {
   sqlite3 db test.db
 } {}
 
+
+# The corruption migration caused by the test case below does not 
+# cause corruption to be detected in mmap mode.
+#
+# The trick here is that the root page of the tree scanned by the outer 
+# query is also currently on the free-list. So while the first seek on
+# the table (for a==1) works, by the time the second is attempted The 
+# "INSERT INTO t2..." statements have recycled the root page of t1 and
+# used it as an index leaf. Normally, BtreeMovetoUnpacked() detects
+# that the PgHdr object associated with said root page does not match
+# the cursor (as it is now marked with PgHdr.intKey==0) and returns
+# SQLITE_CORRUPT. 
+#
+# However, in mmap mode, the outer query and the inner queries use 
+# different PgHdr objects (same data, but different PgHdr container 
+# objects). And so the corruption is not detected. Instead, the second
+# seek fails to find anything and only a single row is returned.
+#
+set res23 {1 {database disk image is malformed}}
+if {[permutation]=="mmap"} {
+  set res23 {0 one}
+}
 do_test 2.3 {
   list [catch {
+  set res [list]
   db eval { SELECT * FROM t1 WHERE a IN (1, 2) } {
     db eval { 
       INSERT INTO t2 SELECT randomblob(100) FROM t2;
@@ -106,9 +129,11 @@ do_test 2.3 {
       INSERT INTO t2 SELECT randomblob(100) FROM t2;
       INSERT INTO t2 SELECT randomblob(100) FROM t2;
     }
+    lappend res $b
   }
+  set res
   } msg] $msg
-} {1 {database disk image is malformed}}
+} $res23
 
 #-------------------------------------------------------------------------
 reset_db
index edfd2660c2b6f52d39e0a949a990fd38459b69b8..2cf73d1b1752293f4cdf4d2038e041f5186a7ec3 100644 (file)
@@ -9,7 +9,7 @@
 #
 #***********************************************************************
 #
-# Tests for the SQLITE_IOERR_NODB error condition: the database file file
+# Tests for the SQLITE_READONLY_DBMOVED error condition: the database file
 # is unlinked or renamed out from under SQLite.
 #
 
@@ -18,6 +18,11 @@ if {$tcl_platform(platform)!="unix"} return
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+if {[permutation]=="inmemory_journal"} {
+  finish_test
+  return
+}
+
 # Create a database file for testing
 #
 do_execsql_test pager4-1.1 {