From: drh Date: Sat, 1 Aug 2009 15:54:25 +0000 (+0000) Subject: Add a testcase for ticket #3810. (CVS 6955) X-Git-Tag: cvs-to-fossil-cutover~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0e0d8ea986573f6f42899f07c5d44bbb9c3f948;p=thirdparty%2Fsqlite.git Add a testcase for ticket #3810. (CVS 6955) FossilOrigin-Name: 29972f7445cede64d99c2433742572120c92b393 --- diff --git a/manifest b/manifest index 4fd98dae49..9a09836250 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\ssegfault\sfollowing\sOOM\sthat\swas\sintroduced\sby\scheck-in\s(6949)\swhich\nwas\sa\sfix\sfor\sticket\s#3997.\s(CVS\s6954) -D 2009-08-01T15:09:58 +C Add\sa\stestcase\sfor\sticket\s#3810.\s(CVS\s6955) +D 2009-08-01T15:54:26 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -646,6 +646,7 @@ F test/tkt3762.test 2a9f3b03df44ec49ec0cfa8d5da6574c2a7853df F test/tkt3773.test 430b06567ce40285dfd2c4834a2a61816403efeb F test/tkt3791.test a6624b9a80b216a26cf473607f42f3e51898c267 F test/tkt3793.test 754b73f0e6a9349c70dc57e522cf3247272ecd5d +F test/tkt3810.test c51a9cd94971231ed45011eae316d1730b57beaf F test/tkt3824.test 3da2f5c81b057e3ff355f5dfc9aa0cf0a92e0206 F test/tkt3832.test 7ebd5ac82d1e430accd5eec9768044133a94c2aa F test/tkt3838.test 2a1525946bc9d3751e1d49ce95f3a2472f2b7408 @@ -740,7 +741,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 -P 12d9b87316cf072d8071fb43ca1232d36720bbca -R f5af2f25a367cfe592d2cf6d961ff240 +P 359d78e144c2399791d341eda1760eb486f9740a +R 624db1eaa8d87e6b2697962c8db1bbed U drh -Z f77a7315fe3ea20a2d85d027081b8522 +Z b5928333d6bd809b9819c0f1cdd1949f diff --git a/manifest.uuid b/manifest.uuid index 67cb096199..660049935e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -359d78e144c2399791d341eda1760eb486f9740a \ No newline at end of file +29972f7445cede64d99c2433742572120c92b393 \ No newline at end of file diff --git a/test/tkt3810.test b/test/tkt3810.test new file mode 100644 index 0000000000..2375ac9e0a --- /dev/null +++ b/test/tkt3810.test @@ -0,0 +1,53 @@ +# 2009 August 1 +# +# 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. +# +#*********************************************************************** +# +# Tests to make sure #3810 is fixed. +# +# $Id: tkt3810.test,v 1.1 2009/08/01 15:54:26 drh Exp $ + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +# Create a table using the first database connection. +# +do_test tkt3810-1 { + execsql { + CREATE TABLE t1(x); + INSERT INTO t1 VALUES(123); + SELECT * FROM t1; + } +} 123 + +# Create a second connection to the same database. Make sure the +# schema of the database has been parsed by the second connection. +# +do_test tkt3810-2 { + sqlite3 db2 test.db + execsql { + SELECT * FROM t1; + } db2 +} 123 + +# DROP the table using the second connection. The table no longer exists +# but the first connection does not yet know this. Then try to create a TEMP +# trigger in the first connection that references the table that was dropped. +# +do_test tkt3810-3 { + execsql {DROP TABLE t1} db2 + execsql { + CREATE TEMP TRIGGER r1 AFTER INSERT ON t1 BEGIN + INSERT INTO t1 VALUES(2345); + END; + SELECT * FROM t1; + } +} {} + +finish_test