Fix a bug in sqlite3_prepare_v2() introduced by checkin (3578) and reported

on the mailing list. (CVS 3592)

FossilOrigin-Name: 87248470362f444f2339fee18d3624e8544f5256
This commit is contained in:
drh
2007-01-12 23:43:42 +00:00
parent e047921c78
commit f6d8ab87c6
4 changed files with 32 additions and 10 deletions
+21 -1
View File
@@ -13,7 +13,7 @@
# This is a copy of the capi3.test file that has been adapted to
# test the new sqlite3_prepare_v2 interface.
#
# $Id: capi3c.test,v 1.5 2007/01/09 15:06:42 drh Exp $
# $Id: capi3c.test,v 1.6 2007/01/12 23:43:43 drh Exp $
#
set testdir [file dirname $argv0]
@@ -1193,4 +1193,24 @@ do_test capi3c-19.99 {
sqlite3_finalize $STMT
} SQLITE_OK
# Make sure a change in a separate database connection does not
# cause an SQLITE_SCHEMA return.
#
do_test capi3c-20.1 {
set STMT [sqlite3_prepare_v2 $DB {SELECT * FROM t3} -1 TAIL]
sqlite3 db2 test.db
db2 eval {CREATE TABLE t4(x)}
sqlite3_step $STMT
} SQLITE_ROW
do_test capi3c-20.2 {
sqlite3_column_int $STMT 1
} 2
do_test capi3c-20.3 {
sqlite3_step $STMT
} SQLITE_DONE
do_test capi3c-20.4 {
db2 close
sqlite3_finalize $STMT
} SQLITE_OK
finish_test