]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a test case for the OOM-fault corruption issue.
authordrh <drh@noemail.net>
Fri, 9 Apr 2010 23:05:24 +0000 (23:05 +0000)
committerdrh <drh@noemail.net>
Fri, 9 Apr 2010 23:05:24 +0000 (23:05 +0000)
Ticket [9d68c883132c8].

FossilOrigin-Name: 0a64a937b583c32c02c83fc669addf79662efea8

manifest
manifest.uuid
test/tkt-9d68c883.test [new file with mode: 0644]

index 7c044f9fed284ef59190e1f29bce6acb692a05a8..fa1b0fb2abd48d8fbe08aa5e1b0dec6a62b28fbd 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Candidate\sfix\sfor\sa\spager\sbug\sassociated\swith\ssqlite3PagerMovepage().
-D 2010-04-09T15:34:06
+C Add\sa\stest\scase\sfor\sthe\sOOM-fault\scorruption\sissue.\nTicket\s[9d68c883132c8].
+D 2010-04-09T23:05:25
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -621,6 +621,7 @@ F test/tkt-4a03edc4c8.test 2865e4edbc075b954daa82f8da7cc973033ec76e
 F test/tkt-5ee23731f.test 3581260f2a71e51db94e1506ba6b0f7311d002a9
 F test/tkt-78e04e52ea.test fb5430c675e708f5cbafdf3e7e5593da5145a527
 F test/tkt-94c04eaadb.test be5ea61cb04dfdc047d19b5c5a9e75fa3da67a7f
+F test/tkt-9d68c883.test 4251ef9fa08158e50b28a682e56124457a59d048
 F test/tkt-cbd054fa6b.test f14f97ea43662e6f70c9e63287081e8be5d9d589
 F test/tkt-d82e3f3721.test 731359dfdcdb36fea0559cd33fec39dd0ceae8e6
 F test/tkt-f777251dc7a.test 6f24c053bc5cdb7e1e19be9a72c8887cf41d5e87
@@ -799,14 +800,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P ae04d2d15d3d96f607adb394a631d96cd4cf2c1d
-R 30296c0b6348ed0103a1b1f6d3985ee2
+P 8c046eb6d16682d5e755624deb4f76f57350b9c9
+R 59022ecbcd3187c087a8d743b1c03f76
 U drh
-Z 428cc332b0d6f67625124f7dd12c1268
+Z e65c61d02944a0779051a86fb1035cc9
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFLv0jyoxKgR168RlERAqqVAJ9Ef7vg/KHku2LiPcS65RJ9IGhkrwCeM8nw
-LLHbyRmzF2wBh0CK3Tp3KoA=
-=60me
+iD8DBQFLv7K6oxKgR168RlERApcYAJ0fCcxRN5TrNOQ/GY6g7TNBl82jQACfb2dY
+vpyFpHFOXknbF1TmB6BNahM=
+=9nt1
 -----END PGP SIGNATURE-----
index a34e8b995d0adcc10673612f50e86b2a0834b976..c6befc7c69b14272a9da48dd3205996d1bb8bb2a 100644 (file)
@@ -1 +1 @@
-8c046eb6d16682d5e755624deb4f76f57350b9c9
\ No newline at end of file
+0a64a937b583c32c02c83fc669addf79662efea8
\ No newline at end of file
diff --git a/test/tkt-9d68c883.test b/test/tkt-9d68c883.test
new file mode 100644 (file)
index 0000000..cad1c59
--- /dev/null
@@ -0,0 +1,53 @@
+# 2010 April 10
+#
+# The author disclaims copyright to this source code.  In place of
+# a legal notice, here is a blessing:
+#
+#    May you do good and not evil.
+#    May you find forgiveness for yourself and forgive others.
+#    May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file tests that bug  9d68c883132c8e9ffcd5b0c148c990807b5df1b7
+# is fixed.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+do_test tkt-XYZ-1.1 {
+  execsql {
+    PRAGMA page_size = 1024;
+    PRAGMA auto_vacuum = 2;
+    CREATE TABLE t3(x);
+    CREATE TABLE t4(x);
+    CREATE TABLE t5(x);
+    INSERT INTO t5 VALUES(randomblob(1500));
+    CREATE TABLE t7(x);
+    CREATE TABLE t8(x);
+  }
+} {}
+
+
+for {set i 0} {$i < 100} {incr i} {
+  db close
+  sqlite3_simulate_device -sectorsize 8192
+  sqlite3 db test.db -vfs devsym
+
+  do_test tkt-XYZ-2.$i {
+    execsql {
+      BEGIN;
+        DELETE FROM t5;
+        INSERT INTO t8 VALUES('hello world');
+    }
+  
+    sqlite3_memdebug_fail $i -repeat 0
+    catchsql { DROP TABLE t7; }
+    sqlite3_memdebug_fail -1
+
+    catchsql { ROLLBACK }
+    execsql { PRAGMA integrity_check }
+  } {ok}
+}
+
+finish_test