Fix a problem with SQLITE_MAX_SQL_LENGTH introduced by check-in (4636).

Ticket #2851 (CVS 4639)

FossilOrigin-Name: cdd866f59797b81b573c68d5c625f9bd9f0f6fde
This commit is contained in:
drh
2007-12-18 17:50:33 +00:00
parent c85375d598
commit be69bf6686
3 changed files with 11 additions and 10 deletions
+6 -6
View File
@@ -1,5 +1,5 @@
C In\sthe\sCLI,\squote\sstrings\sthat\scontain\sthe\sseparator\scharacter.\nTicket\s#2850.\s(CVS\s4638)
D 2007-12-18T15:41:44
C Fix\sa\sproblem\swith\sSQLITE_MAX_SQL_LENGTH\sintroduced\sby\scheck-in\s(4636).\nTicket\s#2851\s(CVS\s4639)
D 2007-12-18T17:50:33
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -128,7 +128,7 @@ F src/pager.c 0cb6ccea4b9615627d61d7c4417cedc45776d429
F src/pager.h f504f7ae84060fee0416a853e368d3d113c3d6fa
F src/parse.y a780b33ef45dd7b3272319cf91e609d6f109a31c
F src/pragma.c 2a5f6439994ec1f7ff7f235d4ac9d37c6cc381ed
F src/prepare.c 75418527ca84305284ec98974ee9e285088aa7bf
F src/prepare.c ff6c3e4cc87c07b27be309a2e38518d86cbddaa2
F src/printf.c eb27822ba2eec669161409ca31279a24c26ac910
F src/random.c 4a22746501bf36b0a088c66e38dde5daba6a35da
F src/select.c 5a137027415a74e950603baddbbcbe9d3f8bc5a5
@@ -600,7 +600,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 15675dc518dbcf2ce2daa0bbcaf8daf3329ead75
R 7df473269d55337eaf1c2164ee79279e
P 493a17c46a66d2febc11205c052bf949a3f22bd8
R 1a3744f4614d5f0fcbc4196d34717f55
U drh
Z 17ffea682be2dd31aa5472716e6a62a2
Z 04e343312b9266e8d0bb12ee1ead5c56
+1 -1
View File
@@ -1 +1 @@
493a17c46a66d2febc11205c052bf949a3f22bd8
cdd866f59797b81b573c68d5c625f9bd9f0f6fde
+4 -3
View File
@@ -13,7 +13,7 @@
** interface, and routines that contribute to loading the database schema
** from disk.
**
** $Id: prepare.c,v 1.66 2007/12/13 21:54:11 drh Exp $
** $Id: prepare.c,v 1.67 2007/12/18 17:50:33 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -530,7 +530,9 @@ int sqlite3Prepare(
sParse.db = db;
if( nBytes>=0 && zSql[nBytes]!=0 ){
char *zSqlCopy;
if( nBytes>SQLITE_MAX_SQL_LENGTH ){
if( SQLITE_MAX_SQL_LENGTH>0 && nBytes>SQLITE_MAX_SQL_LENGTH ){
sqlite3Error(db, SQLITE_TOOBIG, "statement too long");
sqlite3SafetyOff(db);
return SQLITE_TOOBIG;
}
zSqlCopy = sqlite3DbStrNDup(db, zSql, nBytes);
@@ -601,7 +603,6 @@ int sqlite3Prepare(
}
rc = sqlite3ApiExit(db, rc);
/* sqlite3ReleaseThreadData(); */
assert( (rc&db->errMask)==rc );
return rc;
}