From: drh Date: Mon, 8 Jan 2007 22:40:32 +0000 (+0000) Subject: Additional tests of sqlite3_prepare_v2. (CVS 3577) X-Git-Tag: version-3.6.10~2593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1d89f0dd95a4d7c5737c219fc91f3d001ec5a18;p=thirdparty%2Fsqlite.git Additional tests of sqlite3_prepare_v2. (CVS 3577) FossilOrigin-Name: b0650aa6cfcb4c59fd8556b8f5523573538bd7e5 --- diff --git a/manifest b/manifest index 158e905adc..5a881593a3 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index e11048daae..55c261bc28 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3401388dba6c150f788397a4dfbcdb01313247e2 \ No newline at end of file +b0650aa6cfcb4c59fd8556b8f5523573538bd7e5 \ No newline at end of file diff --git a/test/capi3c.test b/test/capi3c.test index e13e2e1a03..5423af3f7f 100644 --- a/test/capi3c.test +++ b/test/capi3c.test @@ -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