aboutsummaryrefslogtreecommitdiff
path: root/src/tokenize.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-05-01 21:13:36 +0000
committerdrh <drh@noemail.net>2009-05-01 21:13:36 +0000
commit24fb627afa360cc7efed23c6ddf1932a85c99b07 (patch)
treef3c7ecfe0f31f0ad33671e34bebe55f6fb36a3c1 /src/tokenize.c
parentd51397a614dd2b5a20697e6084bc9eae260c49b1 (diff)
downloadsqlite-24fb627afa360cc7efed23c6ddf1932a85c99b07.tar.gz
sqlite-24fb627afa360cc7efed23c6ddf1932a85c99b07.zip
Record within the Token structure itself whether or not the token has
been dequoted. This steals one bit from the length of a token and thus limits the size of tokens to 1GiB. (CVS 6589) FossilOrigin-Name: 12bcb03d9b9e1a31c1a3c67cbb4263cc0af2f3d0
Diffstat (limited to 'src/tokenize.c')
-rw-r--r--src/tokenize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tokenize.c b/src/tokenize.c
index 4677811d2..a933de1b9 100644
--- a/src/tokenize.c
+++ b/src/tokenize.c
@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
-** $Id: tokenize.c,v 1.155 2009/03/31 03:41:57 shane Exp $
+** $Id: tokenize.c,v 1.156 2009/05/01 21:13:37 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
@@ -413,10 +413,12 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
assert( pParse->apVarExpr==0 );
enableLookaside = db->lookaside.bEnabled;
if( db->lookaside.pStart ) db->lookaside.bEnabled = 1;
+ pParse->sLastToken.quoted = 1;
while( !db->mallocFailed && zSql[i]!=0 ){
assert( i>=0 );
pParse->sLastToken.z = (u8*)&zSql[i];
assert( pParse->sLastToken.dyn==0 );
+ assert( pParse->sLastToken.quoted );
pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
i += pParse->sLastToken.n;
if( i>mxSqlLen ){