Fix an assert() that may fail if sqlite3_step() is called on a statement after a previous call has already returned SQLITE_SCHEMA.
FossilOrigin-Name: 63bf73452de5a9d03e625e1888444a5355063b74
This commit is contained in:
parent
1d2ce4f804
commit
ef516228db
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Remove\sthe\ssqlite3_reoptimize()\sAPI.\sThe\ssame\sfunctionality\sis\snow\sprovided\sautomatically\sto\squeries\sprepared\susing\sprepare_v2().
|
||||
D 2009-10-19T18:11:10
|
||||
C Fix\san\sassert()\sthat\smay\sfail\sif\ssqlite3_step()\sis\scalled\son\sa\sstatement\safter\sa\sprevious\scall\shas\salready\sreturned\sSQLITE_SCHEMA.
|
||||
D 2009-10-19T18:30:35
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 4ca3f1dd6efa2075bcb27f4dc43eef749877740d
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -209,7 +209,7 @@ F src/vacuum.c f2347520907ee4ec867c9b804d24456b0fd912a7
|
||||
F src/vdbe.c f0d6e7dbd4515758c188c9dd7025eb9dfcf021e0
|
||||
F src/vdbe.h 3fedb2121d026dd127350d33e875a49cf05df2e8
|
||||
F src/vdbeInt.h 8e07f4356dd5bfe03ac5991338e59b68c9b3c717
|
||||
F src/vdbeapi.c 1124f16bbb1d8c9682d9aaead78b87826c39b262
|
||||
F src/vdbeapi.c 64313d606147f3e44dac0364ca3d2f4e5787f23d
|
||||
F src/vdbeaux.c fc032b050e0500000de534b2b0f0c63642459b8f
|
||||
F src/vdbeblob.c 9bfaeab22e261a6a7b6df04e7faaf7d6dfdbef5a
|
||||
F src/vdbemem.c 7055a2941a7802094f4704cedc7a28cc88a23749
|
||||
@ -529,7 +529,7 @@ F test/savepoint3.test e328085853b14898d78ceea00dfe7db18bb6a9ec
|
||||
F test/savepoint4.test c8f8159ade6d2acd9128be61e1230f1c1edc6cc0
|
||||
F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
|
||||
F test/savepoint6.test 2df1d093e59e78d688c64eb20e0457aaea7d08f9
|
||||
F test/schema.test deafe5472099ab5bc65748059dc5182fc8ebad74
|
||||
F test/schema.test 3d8b19e3cf1105929940d387e3577da5a58d8fc0
|
||||
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
|
||||
F test/select1.test f67ca2dfc05df41c7b86eb32ca409b427a5f43b0
|
||||
F test/select2.test 9735da20ccd41e42bf2b4c19fd939141b591adae
|
||||
@ -760,7 +760,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff x
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f x
|
||||
P 6fe6371175482d38ac4aeea994c7b20c18b7de01
|
||||
R f87103fb96f6ce262ce840e0ef0a5e44
|
||||
P 2c50b3d5aab7cd8cc841d61f8c3b2b34d2f0b54b
|
||||
R 0379ed8f298b760fef3fc1740588b12f
|
||||
U dan
|
||||
Z 5a02708d47ce169d35256d399f3d9643
|
||||
Z 51ec9a3921034dcd6f295945d4bf3506
|
||||
|
@ -1 +1 @@
|
||||
2c50b3d5aab7cd8cc841d61f8c3b2b34d2f0b54b
|
||||
63bf73452de5a9d03e625e1888444a5355063b74
|
@ -304,7 +304,7 @@ static int sqlite3Step(Vdbe *p){
|
||||
}
|
||||
|
||||
if( p->pc<=0 && p->expired ){
|
||||
if( ALWAYS(p->rc==SQLITE_OK) ){
|
||||
if( ALWAYS(p->rc==SQLITE_OK || p->rc==SQLITE_SCHEMA) ){
|
||||
p->rc = SQLITE_SCHEMA;
|
||||
}
|
||||
rc = SQLITE_ERROR;
|
||||
|
@ -364,4 +364,24 @@ do_test schema-12.1 {
|
||||
list [sqlite3_step $::STMT] [sqlite3_finalize $::STMT]
|
||||
} {SQLITE_ERROR SQLITE_SCHEMA}
|
||||
|
||||
do_test schema-13.1 {
|
||||
set S [sqlite3_prepare_v2 db "SELECT * FROM sqlite_master" -1 dummy]
|
||||
db function hello hello
|
||||
db function hello {}
|
||||
db auth auth
|
||||
proc auth {args} {
|
||||
if {[lindex $args 0] == "SQLITE_READ"} {return SQLITE_DENY}
|
||||
return SQLITE_OK
|
||||
}
|
||||
sqlite3_step $S
|
||||
} {SQLITE_SCHEMA}
|
||||
|
||||
do_test schema-13.2 {
|
||||
sqlite3_step $S
|
||||
} {SQLITE_SCHEMA}
|
||||
|
||||
do_test schema-13.3 {
|
||||
sqlite3_finalize $S
|
||||
} {SQLITE_SCHEMA}
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user