]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Additional tests of sqlite3_prepare_v2. (CVS 3577)
authordrh <drh@noemail.net>
Mon, 8 Jan 2007 22:40:32 +0000 (22:40 +0000)
committerdrh <drh@noemail.net>
Mon, 8 Jan 2007 22:40:32 +0000 (22:40 +0000)
FossilOrigin-Name: b0650aa6cfcb4c59fd8556b8f5523573538bd7e5

manifest
manifest.uuid
test/capi3c.test

index 158e905adcf9192e92b4fab3f338f5cc7de6f4af..5a881593a361e110f0d799459c13e4ba6e79c8f0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\scritical\sbug\sin\ssqlite3_prepare_v2\sthat\scan\slead\sto\ssegfaults\swhen\nthe\sschema\schanges\sand\sthe\sstatement\sis\srecompiled\sautomatically.\nTicket\s#2154.\s(CVS\s3576)
-D 2007-01-08T21:07:18
+C Additional\stests\sof\ssqlite3_prepare_v2.\s(CVS\s3577)
+D 2007-01-08T22:40:33
 F Makefile.in 7fa74bf4359aa899da5586e394d17735f221315f
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -169,7 +169,7 @@ F test/busy.test 0271c854738e23ad76e10d4096a698e5af29d211
 F test/capi2.test 7ecc9b342cc9ec27b53bbf95724cf2e5874fd496
 F test/capi3.test 4063c4be79fb00704154a1e459a38364de9162a9
 F test/capi3b.test 5f0bc94b104e11086b1103b20277e1910f59c7f4
-F test/capi3c.test 6f4b6f9675f7d19e727fcf9484aafd4056d2a71f
+F test/capi3c.test 19502516df7d541d02bc1662a1b55b925a4a09d0
 F test/cast.test f88e7b6946e9a467cf4bb142d92bb65a83747fc2
 F test/check.test e5ea0c1a06c10e81e3434ca029e2c4a562f2b673
 F test/collate1.test add9454cef160677bb8b34148b8f277ce7f9f1c4
@@ -424,7 +424,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P d49ddc5ff05dd65e73edfa76db7e1af36967d81a
-R 78b1fe7c92e1462c492966872d433235
+P 3401388dba6c150f788397a4dfbcdb01313247e2
+R c581f3929841b43348392d34680cf0ca
 U drh
-Z a1fc9bf56c5d24d3a83eb90db8b46422
+Z 7f0a5792bf1db982fb0c8c14ae2b6732
index e11048daaeb2d8d5dad4f190ad01b7cbbba22582..55c261bc285c9cdbb821d5680fc270b6c54530d3 100644 (file)
@@ -1 +1 @@
-3401388dba6c150f788397a4dfbcdb01313247e2
\ No newline at end of file
+b0650aa6cfcb4c59fd8556b8f5523573538bd7e5
\ No newline at end of file
index e13e2e1a033e95a80afd6b5045be412db53b288a..5423af3f7f25bbe052399081e6835e901cfa0497 100644 (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.2 2007/01/08 21:07:18 drh Exp $
+# $Id: capi3c.test,v 1.3 2007/01/08 22:40:33 drh Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -1128,5 +1128,30 @@ do_test capi3c-17.99 {
   sqlite3_finalize $STMT
 } SQLITE_OK
 
+# On the mailing list it has been reported that finalizing after
+# an SQLITE_BUSY return leads to a segfault.  Here we test that case.
+#
+do_test capi3c-18.1 {
+  sqlite3 db2 test.db
+  set STMT [sqlite3_prepare_v2 $DB {SELECT max(a) FROM t1} -1 TAIL]
+  sqlite3_step $STMT
+} SQLITE_ROW
+do_test capi3c-18.2 {
+  sqlite3_column_int $STMT 0
+} 4
+do_test capi3c-18.3 {
+  sqlite3_reset $STMT
+  db2 eval {BEGIN EXCLUSIVE}
+  sqlite3_step $STMT
+} SQLITE_BUSY
+do_test capi3c-18.4 {
+  sqlite3_finalize $STMT
+} SQLITE_BUSY
+do_test capi3c-18.5 {
+  db2 eval {COMMIT}
+  db2 close
+} {}
+
+
 
 finish_test