]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a test case to reproduce the database corruption problem reported
authordrh <drh@noemail.net>
Fri, 10 Aug 2007 19:46:43 +0000 (19:46 +0000)
committerdrh <drh@noemail.net>
Fri, 10 Aug 2007 19:46:43 +0000 (19:46 +0000)
by ticket #2565. (CVS 4204)

FossilOrigin-Name: f267ce809424ec2cc167bf9750989413a8f925c1

manifest
manifest.uuid
test/softheap1.test [new file with mode: 0644]

index 78c474fd9c6fd11b71374876d640a264a9fb0f96..2ae6e3bda5e9a34f9508d1f6c7dbcf42fc5611de 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\stests\sso\sthat\sthey\swork\sproperly\seven\sif\sthe\ssoft-heap-limit\nis\sset\slow.\s(CVS\s4203)
-D 2007-08-10T19:46:14
+C Add\sa\stest\scase\sto\sreproduce\sthe\sdatabase\scorruption\sproblem\sreported\nby\sticket\s#2565.\s(CVS\s4204)
+D 2007-08-10T19:46:44
 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -363,6 +363,7 @@ F test/shared2.test 8b48f8d33494413ef4cf250110d89403e2bf6b23
 F test/shared3.test 01e3e124dbb3859788aabc7cfb82f7ea04421749
 F test/shared_err.test cc528f6e78665787e93d9ce3a782a2ce5179d821
 F test/soak.test 64f9b27fbcdec43335a88c546ce1983e6ba40d7b
+F test/softheap1.test 2fb06ccd146ed4db04fe63f39e0b02054b38b778
 F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5
 F test/speed1.test 22e1b27af0683ed44dcd2f93ed817a9c3e65084a
 F test/speed2.test 53177056baf6556dcbdcf032bbdfc41c1aa74ded
@@ -523,7 +524,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 8be845981654d2a846c95c699395af222b6c3b43
-R 4f7973200fb8962875d87d3c791c258c
+P e01eb99edfa3390e97847a210532847cc64803da
+R aac32bb1cd0df3e93b59fdd82b5116c9
 U drh
-Z e2088765e2200838211ac2419fa9b628
+Z 295b4c36a089304d77fa0f7b791dfdde
index a7d86a811562c67ba5b9db016e7b03dadbb2e545..4baa0eee9016edc7c64ea7fbcb9e6f2d68fd3c35 100644 (file)
@@ -1 +1 @@
-e01eb99edfa3390e97847a210532847cc64803da
\ No newline at end of file
+f267ce809424ec2cc167bf9750989413a8f925c1
\ No newline at end of file
diff --git a/test/softheap1.test b/test/softheap1.test
new file mode 100644 (file)
index 0000000..62231a4
--- /dev/null
@@ -0,0 +1,36 @@
+# 2007 Aug 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 test script reproduces the problem reported by ticket #2565,
+# A database corruption bug that occurs in auto_vacuum mode when
+# the soft_heap_limit is set low enough to be triggered.
+#
+# $Id: softheap1.test,v 1.1 2007/08/10 19:46:44 drh Exp $
+
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+sqlite3_soft_heap_limit 5000
+do_test softheap1-1.1 {
+  execsql {
+    PRAGMA auto_vacuum=1;
+    CREATE TABLE t1(x);
+    INSERT INTO t1 VALUES(hex(randomblob(5000)));
+    BEGIN;
+    CREATE TABLE t2 AS SELECT * FROM t1;
+    ROLLBACK;
+    PRAGMA integrity_check;
+  }
+} {ok}
+sqlite3_soft_heap_limit $soft_limit
+   
+finish_test