Fix asserts in prepare.c to handle the misuse case of ppStmt==0. (CVS 4843)

FossilOrigin-Name: 788b2c6b537809a496bf30550a12e743c1697eb7
This commit is contained in:
drh 2008-03-08 12:23:30 +00:00
parent cac336ad95
commit 58edb657da
3 changed files with 13 additions and 13 deletions

View File

@ -1,5 +1,5 @@
C Move\sa\scomment\swithin\sthe\sParse\sstructure\sto\smake\sit\smore\saccurate.\sNo\sactual\scode\schanges.\s(CVS\s4842)
D 2008-03-08T06:16:30
C Fix\sasserts\sin\sprepare.c\sto\shandle\sthe\smisuse\scase\sof\sppStmt==0.\s(CVS\s4843)
D 2008-03-08T12:23:31
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in d521464011d6965bbda1b699f1850c6e33141c73
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -133,7 +133,7 @@ F src/pager.c d8690e166a5e3a3c65a04a35a96bbebeb368a6c7
F src/pager.h 8174615ffd14ccc2cad2b081b919a398fa95e3f9
F src/parse.y 00f2698c8ae84f315be5e3f10b63c94f531fdd6d
F src/pragma.c e3f39f8576234887ecd0c1de43dc51af5855930c
F src/prepare.c ead778d792ea09d5b990e460a14bddae150b2a39
F src/prepare.c 62e46b1951ff80efca0c35ae1c4bb58a9d24df7f
F src/printf.c eb27822ba2eec669161409ca31279a24c26ac910
F src/random.c 02ef38b469237482f1ea14a78b2087cfbaec48bd
F src/select.c d0a1e01a2a6c05bd60324e843c7e4581d3605950
@ -623,7 +623,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 4996ff93573c69b51eb7b1348058f85e6cb2728a
R 30b9ad0aeed58f8bd0e49e314e48bfcc
U danielk1977
Z 1b5bbe8043f8fbf804a5e070bef6b888
P 0ca14399b19ee22870394065c5c6a136ea41418d
R f724733ce9da103ef0d5a8a19acd670c
U drh
Z b1684d65fbc0a9268f5ee0a51882c1dc

View File

@ -1 +1 @@
0ca14399b19ee22870394065c5c6a136ea41418d
788b2c6b537809a496bf30550a12e743c1697eb7

View File

@ -13,7 +13,7 @@
** interface, and routines that contribute to loading the database schema
** from disk.
**
** $Id: prepare.c,v 1.77 2008/03/04 17:45:01 mlcreech Exp $
** $Id: prepare.c,v 1.78 2008/03/08 12:23:31 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -683,7 +683,7 @@ int sqlite3_prepare(
){
int rc;
rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,ppStmt,pzTail);
assert( rc==SQLITE_OK || *ppStmt==0 ); /* VERIFY: F13021 */
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
return rc;
}
int sqlite3_prepare_v2(
@ -695,7 +695,7 @@ int sqlite3_prepare_v2(
){
int rc;
rc = sqlite3LockAndPrepare(db,zSql,nBytes,1,ppStmt,pzTail);
assert( rc==SQLITE_OK || *ppStmt==0 ); /* VERIFY: F13021 */
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
return rc;
}
@ -761,7 +761,7 @@ int sqlite3_prepare16(
){
int rc;
rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
assert( rc==SQLITE_OK || *ppStmt==0 ); /* VERIFY: F13021 */
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
return rc;
}
int sqlite3_prepare16_v2(
@ -773,7 +773,7 @@ int sqlite3_prepare16_v2(
){
int rc;
rc = sqlite3Prepare16(db,zSql,nBytes,1,ppStmt,pzTail);
assert( rc==SQLITE_OK || *ppStmt==0 ); /* VERIFY: F13021 */
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
return rc;
}