]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a test case to verify that ticket [f7b4edece25c994857] is fixed.
authordrh <drh@noemail.net>
Sat, 19 Mar 2011 02:04:02 +0000 (02:04 +0000)
committerdrh <drh@noemail.net>
Sat, 19 Mar 2011 02:04:02 +0000 (02:04 +0000)
FossilOrigin-Name: eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe

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

index 8d263a44ac4187558475e562d6b1ad47e927ff78..469c1e3830674670dd8a65d5b88251363eb436d2 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Add\sa\sgeneration\scounter\sto\sthe\sSchema\sobject\sand\senhance\sOP_VerifySchema\nto\salso\scheck\sthe\sSchema\sgeneration.\s\sFix\sfor\nticket\s[f7b4edece25c99].
-D 2011-03-18T21:55:46.167
+C Add\sa\stest\scase\sto\sverify\sthat\sticket\s[f7b4edece25c994857]\sis\sfixed.
+D 2011-03-19T02:04:02.294
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 27701a1653595a1f2187dc61c8117e00a6c1d50f
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -717,6 +717,7 @@ F test/tkt-d11f09d36e.test fb44f7961aa6d4b632fb7b9768239832210b5fc7
 F test/tkt-d82e3f3721.test 731359dfdcdb36fea0559cd33fec39dd0ceae8e6
 F test/tkt-f3e5abed55.test 19fb59268da6f20a69a181b9c14154132d1c65e3
 F test/tkt-f777251dc7a.test 6f24c053bc5cdb7e1e19be9a72c8887cf41d5e87
+F test/tkt-f7b4edec.test d998a08ff2b18b7f62edce8e3044317c45efe6c7
 F test/tkt-f973c7ac31.test 1da0ed15ec2c7749fb5ce2828cd69d07153ad9f4
 F test/tkt-fc62af4523.test 72825d3febdedcd5593a27989fc05accdbfc2bb4
 F test/tkt1435.test f8c52c41de6e5ca02f1845f3a46e18e25cadac00
@@ -917,14 +918,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 54bacb95dd6e2d6ac4971391a40484ccb9126d29
-R 6cc36086e25c2f0aadb53235734f400b
+P 36c04dd1695f0899b53ce58738181b146fc005ed
+R 1ce5c0e249ae858a147a69727867b631
 U drh
-Z 47796039470a6db464668999e5623b15
+Z 179ccdf4b38b983395c742d9461b85ad
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFNg9TloxKgR168RlERAlluAJ9ySnRLNzrDaH+1ma2fpI9DsXAdUQCgi2GJ
-eyursVKuXpy0a1erVqsVqgQ=
-=lOQN
+iD8DBQFNhA8WoxKgR168RlERApdUAJ0ZcnA8de9+BAKkGU67ZwJ/tScyAACcDr2W
+TL3YrSbPYZGi8T9lSJDGJ70=
+=7h3j
 -----END PGP SIGNATURE-----
index 82065e8e68874490696ccc3a13ebc2da02feb9b0..0d946b1bb8b649a98739306d8e28b298bd5540c8 100644 (file)
@@ -1 +1 @@
-36c04dd1695f0899b53ce58738181b146fc005ed
\ No newline at end of file
+eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe
\ No newline at end of file
diff --git a/test/tkt-f7b4edec.test b/test/tkt-f7b4edec.test
new file mode 100644 (file)
index 0000000..f6d3d5b
--- /dev/null
@@ -0,0 +1,74 @@
+# 2011 March 18
+#
+# 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 implements regression tests for SQLite library.
+#
+# This file implements tests to verify that ticket 
+# [f7b4edece25c994857dc139207f55a53c8319fae] has been fixed.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+# Open two database connections to the same database file in
+# shared cache mode.  Create update hooks that will fire on
+# each connection.
+#
+db close
+set ::enable_shared_cache [sqlite3_enable_shared_cache 1]
+sqlite3 db1 test.db
+sqlite3 db2 test.db
+unset -nocomplain HOOKS
+set HOOKS {}
+proc update_hook {args} { lappend ::HOOKS $args }
+db1 update_hook update_hook
+db2 update_hook update_hook
+
+# Create a prepared statement
+#
+do_test tkt-f7b4edec-1 {
+  execsql { CREATE TABLE t1(x, y); } db1
+  execsql { INSERT INTO t1 VALUES(1, 2) } db1
+  set ::HOOKS
+} {{INSERT main t1 1}}
+
+# In the second database connection cause the schema to be reparsed
+# without changing the schema cookie.
+#
+set HOOKS {}
+do_test tkt-f7b4edec-2 {
+  execsql {
+    BEGIN;
+      DROP TABLE t1;
+      CREATE TABLE t1(x, y);
+    ROLLBACK;
+  } db2
+  set ::HOOKS
+} {}
+
+# Rerun the prepared statement that was created prior to the 
+# schema reparse.  Verify that the update-hook gives the correct
+# output.
+#
+set HOOKS {}
+do_test tkt-f7b4edec-3 {
+  execsql { INSERT INTO t1 VALUES(1, 2) } db1
+  set ::HOOKS
+} {{INSERT main t1 2}}
+
+# Be sure to restore the original shared-cache mode setting before
+# returning.
+#
+db1 close
+db2 close
+sqlite3_enable_shared_cache $::enable_shared_cache
+
+
+finish_test