]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Syntax errors override errors from the code generator, not the other
authordrh <drh@noemail.net>
Thu, 25 May 2006 12:17:31 +0000 (12:17 +0000)
committerdrh <drh@noemail.net>
Thu, 25 May 2006 12:17:31 +0000 (12:17 +0000)
way around. (CVS 3192)

FossilOrigin-Name: 5031ffc665782e7b300c498fb8be168443505add

manifest
manifest.uuid
src/parse.y
src/sqliteInt.h
test/attach.test

index bbdb363a40c0f0308e7872ad08a7108ae3b87a61..98e165fa77bc7750bc4394e04fcf38fa612e41f9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Handle\sNULL\sdatabase\snames\sin\sATTACH\sand\sDETACH\sas\sif\sthey\swere\sempty\nstrings.\s\sTicket\s#1825.\s(CVS\s3191)
-D 2006-05-25T11:52:38
+C Syntax\serrors\soverride\serrors\sfrom\sthe\scode\sgenerator,\snot\sthe\sother\nway\saround.\s(CVS\s3192)
+D 2006-05-25T12:17:31
 F Makefile.in 5d8dff443383918b700e495de42ec65bc1c8865b
 F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -61,7 +61,7 @@ F src/os_win.c 8ced9ac82670bbf77492961a2f7ff80a87f1404f
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
 F src/pager.c ddd05666bb89808a516baef2c186d6a75887ae90
 F src/pager.h 43f32f3847421f7502cfbb66f4eb2302b8033818
-F src/parse.y ee1887ce0e6eea15cc728913ad3462898f88e9b0
+F src/parse.y 50ab45ec8e01a90cb5d75f53ce4bf95f0ca10481
 F src/pragma.c 27d5e395c5d950931c7ac4fe610e7c2993e2fa55
 F src/prepare.c bbf12d3147116b284b157232efaef3bbe5df08fc
 F src/printf.c 7029e5f7344a478394a02c52837ff296ee1ab240
@@ -70,7 +70,7 @@ F src/select.c 8daba07a04a6d41f5267ea8353324cbe5a210e14
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c 1862fab6f7cfe80749b21eb7d6d3195585461a83
 F src/sqlite.h.in e783b895fe2fcd68f6c04408a4efaef58cd1cdda
-F src/sqliteInt.h 9052a26e0467be0ac0c554fb1f8de671eda2ea0d
+F src/sqliteInt.h 98b3d7e9c4c48fd128d03d5788ca8fae0994280a
 F src/table.c f64ec4fbfe333f8df925bc6ba494f55e05b0e75e
 F src/tclsqlite.c 5ae9f08f7af7fe80d38fbccc4f5359f272643af1
 F src/test1.c becd9202b733debc607b5aec43002769730e1f71
@@ -107,7 +107,7 @@ F test/altermalloc.test 6e1f404ec021eb2ba6582e3c77b0a35cf206b7af
 F test/analyze.test 2f55535aa335785db1a2f97d3f3831c16c09f8b0
 F test/async.test 464dc7c7ccb144e8c82ecca429e6d7cd1c96bd6e
 F test/async2.test 81e4a1fd010c903eb3b763fdb4c4cad7a99afb14
-F test/attach.test 036315207c477211470168bf121b1c493f781515
+F test/attach.test c616a88eab6b6fd99b7b2fcf449420f14628bc0b
 F test/attach2.test 0e6a7c54343c85dd877a1e86073a05176043ed40
 F test/attach3.test fc0302e8fe9c172fb49e000227c19b5c428a9429
 F test/attachmalloc.test cdb26c42850f04698377ccec05f5fa89d987837c
@@ -356,7 +356,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P c8e5ceedee087098c04e3b6b8b82710de0563e77
-R 92b272fc10eef000585a2fbf978f3171
+P 79a818bb05bc95c4c83375a679955dd18659b2b8
+R 6afc2153b06fc7cd8865c6e7fb5353fb
 U drh
-Z a97a523d146f3a82e0903b8c989a26c5
+Z eed30d1789873390dba60e245702f077
index e1d9a0015d6e3b027e6aa2d967e254b055a8c644..40606009ee5ea7c625a608e1a81bf2b7da6d2491 100644 (file)
@@ -1 +1 @@
-79a818bb05bc95c4c83375a679955dd18659b2b8
\ No newline at end of file
+5031ffc665782e7b300c498fb8be168443505add
\ No newline at end of file
index b45d1986cef56b58bf6c82251dc6bb979a486bef..dd25152777cadc9f236b7f671a4f485b26895a49 100644 (file)
@@ -14,7 +14,7 @@
 ** the parser.  Lemon will also generate a header file containing
 ** numeric codes for all of the tokens.
 **
-** @(#) $Id: parse.y,v 1.199 2006/03/13 12:54:10 drh Exp $
+** @(#) $Id: parse.y,v 1.200 2006/05/25 12:17:31 drh Exp $
 */
 
 // All token codes are small integers with #defines that begin with "TK_"
 // This code runs whenever there is a syntax error
 //
 %syntax_error {
-  if( pParse->zErrMsg==0 ){
+  if( !pParse->parseError ){
     if( TOKEN.z[0] ){
       sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
     }else{
       sqlite3ErrorMsg(pParse, "incomplete SQL statement");
     }
+    pParse->parseError = 1;
   }
 }
 %stack_overflow {
   sqlite3ErrorMsg(pParse, "parser stack overflow");
+  pParse->parseError = 1;
 }
 
 // The name of the generated procedure that implements the parser
index 50ff7a93c277b7484cfbc32e1cd6d928135edc9e..80d4a19d6c664d2bca53d14ff3169e1f38cc2c11 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.493 2006/04/04 01:54:55 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.494 2006/05/25 12:17:31 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -1237,6 +1237,7 @@ struct Parse {
   u8 nameClash;        /* A permanent table name clashes with temp table name */
   u8 checkSchema;      /* Causes schema cookie check after an error */
   u8 nested;           /* Number of nested calls to the parser/code generator */
+  u8 parseError;       /* True if a parsing error has been seen */
   int nErr;            /* Number of errors seen */
   int nTab;            /* Number of previously allocated VDBE cursors */
   int nMem;            /* Number of memory cells used so far */
index f195fbe9778fa22eca579b9bb7ce14676a192558..6d93af1a5ff73d10e6368aa32581c02cc3d23e8e 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this script is testing the ATTACH and DETACH commands
 # and related functionality.
 #
-# $Id: attach.test,v 1.42 2006/01/16 16:24:25 danielk1977 Exp $
+# $Id: attach.test,v 1.43 2006/05/25 12:17:32 drh Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -618,7 +618,7 @@ do_test attach-5.1 {
   sqlite3 db2 test2.db
   catchsql {
     ATTACH DATABASE 'test.db' AS orig;
-    CREATE TRIGGER r1 AFTER INSERT ON orig.t1 BEGIN;
+    CREATE TRIGGER r1 AFTER INSERT ON orig.t1 BEGIN
       SELECT 'no-op';
     END;
   } db2