Add a test case to verify that ticket [f7b4edece25c994857] is fixed.

FossilOrigin-Name: eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe
This commit is contained in:
drh 2011-03-19 02:04:02 +00:00
parent c2a75551ef
commit 8ce0261d09
3 changed files with 84 additions and 9 deletions

View File

@ -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-----

View File

@ -1 +1 @@
36c04dd1695f0899b53ce58738181b146fc005ed
eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe

74
test/tkt-f7b4edec.test Normal file
View File

@ -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