]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Added mallocJ.test to test allocation failure handling of the new LIMIT/OFFSET suppor...
authorshane <shane@noemail.net>
Fri, 10 Oct 2008 13:34:29 +0000 (13:34 +0000)
committershane <shane@noemail.net>
Fri, 10 Oct 2008 13:34:29 +0000 (13:34 +0000)
FossilOrigin-Name: 5375b348b12a4ae149472c84d6f05a78a5542a21

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

index 63ec8ad82cb91b232e5abe9a43a6d1756c5c2bac..001659bc901aa8a5088c3203e1424e64b3bf4084 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Initial\stest\scases\sfor\sthe\snew\sLIMIT/OFFSET\ssupport\sfor\sDELETE/UPDATE.\s(CVS\s5789)
-D 2008-10-10T06:02:00
+C Added\smallocJ.test\sto\stest\sallocation\sfailure\shandling\sof\sthe\snew\sLIMIT/OFFSET\ssupport\sfor\sUPDATE/DELETE.\s(CVS\s5790)
+D 2008-10-10T13:34:30
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 7fc26e087207e7a4a7723583dbd7997477af3b13
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -426,6 +426,7 @@ F test/mallocF.test 2d5c590ebc2fc7f0dcebdf5aa8498b9aed69107e
 F test/mallocG.test 4584d0d8ddb8009f16ca0c8bab1fa37f6358efa2
 F test/mallocH.test 79b65aed612c9b3ed2dcdaa727c85895fd1bfbdb
 F test/mallocI.test 6e24fe6444bd2999ccc81f984977b44c0d6e5591
+F test/mallocJ.test d7a6e82de88d194055ae715da50cc09179603282
 F test/malloc_common.tcl 984baeb6c6b185e798827d1187d426acc2bc4962
 F test/manydb.test 8de36b8d33aab5ef295b11d9e95310aeded31af8
 F test/memdb.test a67bda4ff90a38f2b19f6c7f95aa7289e051d893
@@ -644,7 +645,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P c10e8a3c7ab7f21c95f24d0aba590f5b18a4b028
-R b166ba9a18f5976ff7ef273258c21d55
+P d9f5e15ca00d4d54dc395926e4c9171f1d24982a
+R dfa4b7b9e1553fcd1e404a370d8e4d74
 U shane
-Z b86642ea37c63f597875144fc2ecff76
+Z ffe92c254732044ed662adfc03c644f0
index 95e681999be43d76f68e9765848ca270d4cb8678..b2a5249dd82a7fa15e368bb3990835d283ced71f 100644 (file)
@@ -1 +1 @@
-d9f5e15ca00d4d54dc395926e4c9171f1d24982a
\ No newline at end of file
+5375b348b12a4ae149472c84d6f05a78a5542a21
\ No newline at end of file
diff --git a/test/mallocJ.test b/test/mallocJ.test
new file mode 100644 (file)
index 0000000..accafe4
--- /dev/null
@@ -0,0 +1,41 @@
+# 2008 August 01
+#
+# 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 checks malloc failures in LIMIT operations for 
+# UPDATE/DELETE statements.
+# 
+# $Id: mallocJ.test,v 1.1 2008/10/10 13:34:30 shane Exp $
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+source $testdir/malloc_common.tcl
+
+ifcapable {update_delete_limit} {
+
+  do_malloc_test mallocJ-4 -sqlprep {
+    DROP TABLE IF EXISTS t1;
+    CREATE TABLE t1(x int, y int);
+    INSERT INTO t1 VALUES(1,1);
+    INSERT INTO t1 VALUES(1,2);
+    INSERT INTO t1 VALUES(1,2);
+    INSERT INTO t1 VALUES(2,1);
+    INSERT INTO t1 VALUES(2,2);
+    INSERT INTO t1 VALUES(2,3);
+  } -sqlbody {
+    UPDATE t1 SET x=1 ORDER BY y LIMIT 2 OFFSET 2;
+    UPDATE t1 SET x=2 WHERE y=1 ORDER BY y LIMIT 2 OFFSET 2;
+    DELETE FROM t1 WHERE x=1 ORDER BY y LIMIT 2 OFFSET 2;
+    DELETE FROM t1 ORDER BY y LIMIT 2 OFFSET 2;
+  }
+
+}
+
+finish_test