]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove two unused fields from the Parse structure. The TCL interface now
authordrh <drh@noemail.net>
Fri, 3 Jul 2009 22:54:36 +0000 (22:54 +0000)
committerdrh <drh@noemail.net>
Fri, 3 Jul 2009 22:54:36 +0000 (22:54 +0000)
removes leading whitespace from SQL statements before parsing them. (CVS 6846)

FossilOrigin-Name: 983cb6924b8a7d3057718b9228c0cb2fbe7f0dc4

manifest
manifest.uuid
src/sqliteInt.h
src/tclsqlite.c
src/tokenize.c

index d0e14bdff2df219f283df8287aee590db08dffb7..ac283c0c716208ae3ee66ed1e4423706467245f6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sunused\scode\s(that\swas\scommented\sout)\sfrom\sprepare.c.\s\sRemove\san\nincorrect\sNEVER()\smacro.\s\sFix\sthe\scomment\son\sschemaIsValid()\sto\scorrectly\ndescribe\sits\sreturn\sbehavior.\s(CVS\s6845)
-D 2009-07-03T19:19:50
+C Remove\stwo\sunused\sfields\sfrom\sthe\sParse\sstructure.\s\sThe\sTCL\sinterface\snow\nremoves\sleading\swhitespace\sfrom\sSQL\sstatements\sbefore\sparsing\sthem.\s(CVS\s6846)
+D 2009-07-03T22:54:37
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -163,11 +163,11 @@ F src/select.c 71748b8e244112cf73df9446c4246c192276c30d
 F src/shell.c db2643650b9268df89a4bedca3f1c6d9e786f1bb
 F src/sqlite.h.in ccc67f14d5661240d05eadb8ab308aa637b0630c
 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
-F src/sqliteInt.h 8460c998fff4834f875c32233a2d63004163cee9
+F src/sqliteInt.h 336d10317b991fda9019d8dcc6f67e936fc55ae9
 F src/sqliteLimit.h ffe93f5a0c4e7bd13e70cd7bf84cfb5c3465f45d
 F src/status.c 237b193efae0cf6ac3f0817a208de6c6c6ef6d76
 F src/table.c cc86ad3d6ad54df7c63a3e807b5783c90411a08d
-F src/tclsqlite.c d3195e0738c101a155404ecdb1cd9532a2fd34f2
+F src/tclsqlite.c e18e5013dc6bca9f25e6022fbe17ba3ccb821f95
 F src/test1.c c8f9358879876660b721369f576bf6e4ac5b9210
 F src/test2.c d73e4a490349245fb196b990b80684513e0ceaee
 F src/test3.c a06da9e41583fe8e4eb8c4dea323bb72bdbaaa1e
@@ -198,7 +198,7 @@ F src/test_server.c f0a403b5f699c09bd2b1236b6f69830fd6221f6b
 F src/test_tclvar.c 9e42fa59d3d2f064b7ab8628e7ab2dc8a9fe93d4
 F src/test_thread.c b8a1ab7ca1a632f18e8a361880d5d65eeea08eac
 F src/test_wsd.c 3ae5101de6cbfda2720152ab659ea84079719241
-F src/tokenize.c eadd396fa81e8031d4b4a65eefd661e9c675167f
+F src/tokenize.c af8a56e6a50c5042fc305bfa796275e9bf26ff2b
 F src/trigger.c c07c5157c58fcdb704f65d5f5e4775276e45bb8b
 F src/update.c a1bbe774bce495d62dce3df3f42a5f04c1de173a
 F src/utf.c 9541d28f40441812c0b40f00334372a0542c00ff
@@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P e9849292ab741f4c86203b2629dbe116f9b527c8
-R 587ce2327c9513e978edc633162d7539
+P 90deb65835febc908f21bca89ef497d1048afe0a
+R 430f40c3b49dbd6d5c53832ea096a991
 U drh
-Z bd714fe85ba5b195da90521b32b83698
+Z 301b92e83560c1a5b1bd3c9e33371bc8
index f767ec128c433f7fd495572511140631c7ab08e2..2c0c3bb99538a89535e45b4945805eec3f17a1b2 100644 (file)
@@ -1 +1 @@
-90deb65835febc908f21bca89ef497d1048afe0a
\ No newline at end of file
+983cb6924b8a7d3057718b9228c0cb2fbe7f0dc4
\ No newline at end of file
index 304697e51f31bb31f05512565dec1835c1132b01..8420425a502c837f14bf355bb12c9ebb9f9fa8f1 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.891 2009/07/03 15:37:28 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.892 2009/07/03 22:54:37 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -2020,10 +2020,8 @@ struct Parse {
   int nAliasAlloc;     /* Number of allocated slots for aAlias[] */
   int *aAlias;         /* Register used to hold aliased result */
   u8 explain;          /* True if the EXPLAIN flag is found on the query */
-  Token sErrToken;     /* The token at which the error occurred */
   Token sNameToken;    /* Token with unqualified schema object name */
   Token sLastToken;    /* The last token parsed */
-  const char *zSql;    /* All SQL text */
   const char *zTail;   /* All SQL text past the last semicolon parsed */
   Table *pNewTable;    /* A table being constructed by CREATE TABLE */
   Trigger *pNewTrigger;     /* Trigger under construct by a CREATE TRIGGER */
index 4c6c5fc312a5475c3ba6878940185d869c821344..d353fc3dd4f8bb19c2164772971818ee39c13677 100644 (file)
@@ -12,7 +12,7 @@
 ** A TCL Interface to SQLite.  Append this file to sqlite3.c and
 ** compile the whole thing to build a TCL-enabled version of SQLite.
 **
-** $Id: tclsqlite.c,v 1.241 2009/03/27 12:44:35 drh Exp $
+** $Id: tclsqlite.c,v 1.242 2009/07/03 22:54:37 drh Exp $
 */
 #include "tcl.h"
 #include <errno.h>
@@ -1674,6 +1674,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
       ** which matches the next sequence of SQL.
       */
       pStmt = 0;
+      while( isspace(zSql[0]) ){ zSql++; }
       len = strlen30(zSql);
       for(pPreStmt = pDb->stmtList; pPreStmt; pPreStmt=pPreStmt->pNext){
         int n = pPreStmt->nSql;
index 3fdb38edebe74ec45be931cfae2530a7e57666ec..97c4b7b59a7297835eac4ea27418d2efa066ea3e 100644 (file)
@@ -15,7 +15,7 @@
 ** individual tokens and sends those tokens one-by-one over to the
 ** parser for analysis.
 **
-** $Id: tokenize.c,v 1.162 2009/06/23 20:28:54 drh Exp $
+** $Id: tokenize.c,v 1.163 2009/07/03 22:54:37 drh Exp $
 */
 #include "sqliteInt.h"
 #include <stdlib.h>
@@ -410,7 +410,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
     db->u1.isInterrupted = 0;
   }
   pParse->rc = SQLITE_OK;
-  pParse->zTail = pParse->zSql = zSql;
+  pParse->zTail = zSql;
   i = 0;
   assert( pzErrMsg!=0 );
   pEngine = sqlite3ParserAlloc((void*(*)(size_t))sqlite3Malloc);