]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix asserts in prepare.c to handle the misuse case of ppStmt==0. (CVS 4843)
authordrh <drh@noemail.net>
Sat, 8 Mar 2008 12:23:30 +0000 (12:23 +0000)
committerdrh <drh@noemail.net>
Sat, 8 Mar 2008 12:23:30 +0000 (12:23 +0000)
FossilOrigin-Name: 788b2c6b537809a496bf30550a12e743c1697eb7

manifest
manifest.uuid
src/prepare.c

index 1e734d32a6f1a6fccfedbda9c005a7644f165122..ab34aa9c5ba62326f0128269b3a62abea8c96633 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index 015e47573d4db38533e80b6819a11a62d6e4acba..0895bb5496f8999080ad7fb7802ce26902bf25c4 100644 (file)
@@ -1 +1 @@
-0ca14399b19ee22870394065c5c6a136ea41418d
\ No newline at end of file
+788b2c6b537809a496bf30550a12e743c1697eb7
\ No newline at end of file
index 99ac90409a27fb9780b2f16ecc74ab89a9cce6e9..8bda5e7899c1b4b40a2488398c234319c0551f40 100644 (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;
 }