# Test case for query cache invalidation bug with explicit
# transaction.

# create a test table "regress_test".
'Q'	"CREATE TABLE regress_test(i int)"
'Y'

# create named statement S1 for INSERT.
'P'	"S1"	"INSERT INTO regress_test VALUES(1)"	0
'B'	""	"S1"	0	0	0
'E'	""	1
'S'
'Y'

# create query cache.
'P'	"S2"	"SELECT * FROM regress_test WHERE i = 1"	0
'B'	""	"S2"	0	0	0   
'E'	""	0
'S'
'Y'

# start an explicit transaction.
'P'	"S3"	"BEGIN"	0
'B'	""	"S3"	0	0	0   
'E'	""	0
'S'
'Y'

# INSERT one more row without bind message.
'B'	""	"S1"	0	0	0
'E'	""	1
'S'
'Y'

# commit the transaction.
'P'	"S4"	"COMMIT"	0
'B'	""	"S4"	0	0	0   
'E'	""	0
'S'
'Y'

# This should return 2 rows if query cache validation succeeds.
'B'	""	"S2"	0	0	0   
'E'	""	0
'S'
'Y'

# drop the test table.
'Q'	"DROP TABLE regress_test"
'Y'

'X'
