/ Check-in [f84d9dab]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure pParse->rc gets set whenever sqlite3ErrorMsg() is called. This is added insurance that parsing will stop quickly after an error. This change did make the parser stop faster in some cases, which required some revisions to tests. (CVS 4010)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f84d9dab110c4415d9b772f8043397640162b6b2
User & Date: drh 2007-05-15 16:51:37
Context
2007-05-15
18:35
Additional tests for malformed UTF-8. (CVS 4011) check-in: 448d3ef6 user: drh tags: trunk
16:51
Make sure pParse->rc gets set whenever sqlite3ErrorMsg() is called. This is added insurance that parsing will stop quickly after an error. This change did make the parser stop faster in some cases, which required some revisions to tests. (CVS 4010) check-in: f84d9dab user: drh tags: trunk
14:40
Remove the alternative UTF-16 implementation of SUBSTR(). It does not work anymore and the UTF-8 version can do everything that the UTF-16 version does. (CVS 4009) check-in: 9b91502e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/parse.y.

    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains SQLite's grammar for SQL.  Process this file
    13     13   ** using the lemon parser generator to generate C code that runs
    14     14   ** the parser.  Lemon will also generate a header file containing
    15     15   ** numeric codes for all of the tokens.
    16     16   **
    17         -** @(#) $Id: parse.y,v 1.227 2007/05/15 00:09:13 drh Exp $
           17  +** @(#) $Id: parse.y,v 1.228 2007/05/15 16:51:37 drh Exp $
    18     18   */
    19     19   
    20     20   // All token codes are small integers with #defines that begin with "TK_"
    21     21   %token_prefix TK_
    22     22   
    23     23   // The type of the data attached to each token is Token.  This is also the
    24     24   // default type for non-terminals.
................................................................................
    35     35     if( !pParse->parseError ){
    36     36       if( TOKEN.z[0] ){
    37     37         sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
    38     38       }else{
    39     39         sqlite3ErrorMsg(pParse, "incomplete SQL statement");
    40     40       }
    41     41       pParse->parseError = 1;
    42         -    pParse->rc = SQLITE_ERROR;
    43     42     }
    44     43   }
    45     44   %stack_overflow {
    46     45     sqlite3ErrorMsg(pParse, "parser stack overflow");
    47     46     pParse->parseError = 1;
    48     47   }
    49     48   

Changes to src/sqliteInt.h.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Internal interface definitions for SQLite.
    13     13   **
    14         -** @(#) $Id: sqliteInt.h,v 1.567 2007/05/15 11:55:09 drh Exp $
           14  +** @(#) $Id: sqliteInt.h,v 1.568 2007/05/15 16:51:37 drh Exp $
    15     15   */
    16     16   #ifndef _SQLITEINT_H_
    17     17   #define _SQLITEINT_H_
    18     18   #include "limits.h"
    19     19   
    20     20   
    21     21   #if defined(SQLITE_TCL) || defined(TCLSH)
................................................................................
  1305   1305     int rc;              /* Return code from execution */
  1306   1306     char *zErrMsg;       /* An error message */
  1307   1307     Vdbe *pVdbe;         /* An engine for executing database bytecode */
  1308   1308     u8 colNamesSet;      /* TRUE after OP_ColumnName has been issued to pVdbe */
  1309   1309     u8 nameClash;        /* A permanent table name clashes with temp table name */
  1310   1310     u8 checkSchema;      /* Causes schema cookie check after an error */
  1311   1311     u8 nested;           /* Number of nested calls to the parser/code generator */
  1312         -  u8 parseError;       /* True if a parsing error has been seen */
         1312  +  u8 parseError;       /* True after a parsing error.  Ticket #1794 */
  1313   1313     int nErr;            /* Number of errors seen */
  1314   1314     int nTab;            /* Number of previously allocated VDBE cursors */
  1315   1315     int nMem;            /* Number of memory cells used so far */
  1316   1316     int nSet;            /* Number of sets used so far */
  1317   1317     int ckOffset;        /* Stack offset to data used by CHECK constraints */
  1318   1318     u32 writeMask;       /* Start a write transaction on these databases */
  1319   1319     u32 cookieMask;      /* Bitmask of schema verified databases */

Changes to src/util.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Utility functions used throughout sqlite.
    13     13   **
    14     14   ** This file contains functions for allocating memory, comparing
    15     15   ** strings, and stuff like that.
    16     16   **
    17         -** $Id: util.c,v 1.202 2007/05/08 20:37:40 drh Exp $
           17  +** $Id: util.c,v 1.203 2007/05/15 16:51:37 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   #include <stdarg.h>
    22     22   #include <ctype.h>
    23     23   
    24     24   
................................................................................
    79     79   void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
    80     80     va_list ap;
    81     81     pParse->nErr++;
    82     82     sqliteFree(pParse->zErrMsg);
    83     83     va_start(ap, zFormat);
    84     84     pParse->zErrMsg = sqlite3VMPrintf(zFormat, ap);
    85     85     va_end(ap);
           86  +  if( pParse->rc==SQLITE_OK ){
           87  +    pParse->rc = SQLITE_ERROR;
           88  +  }
    86     89   }
    87     90   
    88     91   /*
    89     92   ** Clear the error message in pParse, if any
    90     93   */
    91     94   void sqlite3ErrorClear(Parse *pParse){
    92     95     sqliteFree(pParse->zErrMsg);

Changes to test/alter.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #*************************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is testing the ALTER TABLE statement.
    13     13   #
    14         -# $Id: alter.test,v 1.24 2007/05/15 14:34:32 drh Exp $
           14  +# $Id: alter.test,v 1.25 2007/05/15 16:51:37 drh Exp $
    15     15   #
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # If SQLITE_OMIT_ALTERTABLE is defined, omit this file.
    21     21   ifcapable !altertable {
................................................................................
   698    698     execsql {
   699    699       ALTER TABLE t11 ADD COLUMN abc;
   700    700     }
   701    701     catchsql {
   702    702       ALTER TABLE t11 ADD COLUMN abc;
   703    703     }
   704    704   } {1 {duplicate column name: abc}}
   705         -do_test alter-11.2 {
   706         -  execsql {INSERT INTO t11 VALUES(1,2)}
   707         -  sqlite3_exec db {SELECT %c6%c6 AS xyz, abc FROM t11}
   708         -} {0 {xyz abc 1 2}}
          705  +set isutf16 [regexp 16 [db one {PRAGMA encoding}]]
          706  +if {!$isutf16} {
          707  +  do_test alter-11.2 {
          708  +    execsql {INSERT INTO t11 VALUES(1,2)}
          709  +    sqlite3_exec db {SELECT %c6%c6 AS xyz, abc FROM t11}
          710  +  } {0 {xyz abc 1 2}}
          711  +}
   709    712   do_test alter-11.3 {
   710    713     sqlite3_exec db {CREATE TABLE t11b("%81%82%83" text)}
   711    714     execsql {
   712    715       ALTER TABLE t11b ADD COLUMN abc;
   713    716     }
   714    717     catchsql {
   715    718       ALTER TABLE t11b ADD COLUMN abc;
   716    719     }
   717    720   } {1 {duplicate column name: abc}}
   718         -do_test alter-11.4 {
   719         -  execsql {INSERT INTO t11b VALUES(3,4)}
   720         -  sqlite3_exec db {SELECT %81%82%83 AS xyz, abc FROM t11b}
   721         -} {0 {xyz abc 3 4}}
   722         -do_test alter-11.5 {
   723         -  sqlite3_exec db {SELECT [%81%82%83] AS xyz, abc FROM t11b}
   724         -} {0 {xyz abc 3 4}}
   725         -do_test alter-11.6 {
   726         -  sqlite3_exec db {SELECT "%81%82%83" AS xyz, abc FROM t11b}
   727         -} {0 {xyz abc 3 4}}
          721  +if {!$isutf16} {
          722  +  do_test alter-11.4 {
          723  +    execsql {INSERT INTO t11b VALUES(3,4)}
          724  +    sqlite3_exec db {SELECT %81%82%83 AS xyz, abc FROM t11b}
          725  +  } {0 {xyz abc 3 4}}
          726  +  do_test alter-11.5 {
          727  +    sqlite3_exec db {SELECT [%81%82%83] AS xyz, abc FROM t11b}
          728  +  } {0 {xyz abc 3 4}}
          729  +  do_test alter-11.6 {
          730  +    sqlite3_exec db {SELECT "%81%82%83" AS xyz, abc FROM t11b}
          731  +  } {0 {xyz abc 3 4}}
          732  +}
   728    733   do_test alter-11.7 {
   729    734     sqlite3_exec db {CREATE TABLE t11c(%81%82%83 text)}
   730    735     execsql {
   731    736       ALTER TABLE t11c ADD COLUMN abc;
   732    737     }
   733    738     catchsql {
   734    739       ALTER TABLE t11c ADD COLUMN abc;
   735    740     }
   736    741   } {1 {duplicate column name: abc}}
   737         -do_test alter-11.8 {
   738         -  execsql {INSERT INTO t11c VALUES(5,6)}
   739         -  sqlite3_exec db {SELECT %81%82%83 AS xyz, abc FROM t11c}
   740         -} {0 {xyz abc 5 6}}
   741         -do_test alter-11.9 {
   742         -  sqlite3_exec db {SELECT [%81%82%83] AS xyz, abc FROM t11c}
   743         -} {0 {xyz abc 5 6}}
   744         -do_test alter-11.10 {
   745         -  sqlite3_exec db {SELECT "%81%82%83" AS xyz, abc FROM t11c}
   746         -} {0 {xyz abc 5 6}}
          742  +if {!$isutf16} {
          743  +  do_test alter-11.8 {
          744  +    execsql {INSERT INTO t11c VALUES(5,6)}
          745  +    sqlite3_exec db {SELECT %81%82%83 AS xyz, abc FROM t11c}
          746  +  } {0 {xyz abc 5 6}}
          747  +  do_test alter-11.9 {
          748  +    sqlite3_exec db {SELECT [%81%82%83] AS xyz, abc FROM t11c}
          749  +  } {0 {xyz abc 5 6}}
          750  +  do_test alter-11.10 {
          751  +    sqlite3_exec db {SELECT "%81%82%83" AS xyz, abc FROM t11c}
          752  +  } {0 {xyz abc 5 6}}
          753  +}
   747    754   
   748    755   
   749    756   finish_test

Changes to test/fuzz2.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library. 
    12     12   #
    13     13   # This file checks error recovery from malformed SQL strings.
    14     14   #
    15         -# $Id: fuzz2.test,v 1.2 2007/05/15 03:56:50 drh Exp $
           15  +# $Id: fuzz2.test,v 1.3 2007/05/15 16:51:37 drh Exp $
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
           20  +
           21  +proc fuzzcatch {sql} {
           22  +  return [lindex [catchsql $sql] 0]
           23  +}
           24  +
    20     25   do_test fuzz2-1.1 {
    21         -  catchsql {SELECT ALL "AAAAAA" . * GROUP BY LIMIT round(1), #12}
    22         -} {1 {near "#12": syntax error}}
           26  +  fuzzcatch {SELECT ALL "AAAAAA" . * GROUP BY LIMIT round(1), #12}
           27  +} {1}
    23     28   do_test fuzz2-2.0 {
    24         -  catchsql {SELECT + #100}
    25         -} {1 {near "#100": syntax error}}
           29  +  fuzzcatch {SELECT + #100}
           30  +} {1}
    26     31   do_test fuzz2-2.1 {
    27         -  catchsql {SELECT 1 WHERE ( #61 NOT MATCH ROUND( 1 ) )}
    28         -} {1 {near "#61": syntax error}}
           32  +  fuzzcatch {SELECT 1 WHERE ( #61 NOT MATCH ROUND( 1 ) )}
           33  +} {1}
    29     34   do_test fuzz2-2.2 {
    30         -  catchsql {SELECT 1 LIMIT NOT #59 COLLATE AAAAAA NOT IN 
           35  +  fuzzcatch {SELECT 1 LIMIT NOT #59 COLLATE AAAAAA NOT IN 
    31     36       ( "AAAAAA" NOTNULL <= x'414141414141' IS NULL , ( ROUND ( 1.0 ) ) )}
    32         -} {1 {no such collation sequence: AAAAAA}}
           37  +} {1}
    33     38   do_test fuzz2-2.3 {
    34         -  catchsql {INSERT OR REPLACE INTO AAAAAA . "AAAAAA" ( "AAAAAA" ) SELECT DISTINCT * , ( SELECT #252 IN ( SELECT DISTINCT AAAAAA . * ) )}
    35         -} {1 {near "#252": syntax error}}
           39  +  fuzzcatch {INSERT OR REPLACE INTO AAAAAA . "AAAAAA" ( "AAAAAA" ) SELECT DISTINCT * , ( SELECT #252 IN ( SELECT DISTINCT AAAAAA . * ) )}
           40  +} {1}
    36     41   do_test fuzz2-2.4 {
    37         -  catchsql {SELECT 1 LIMIT NOT #59 COLLATE AAAAAA NOT IN round(1.0)}
    38         -} {1 {near "(": syntax error}}
           42  +  fuzzcatch {SELECT 1 LIMIT NOT #59 COLLATE AAAAAA NOT IN round(1.0)}
           43  +} {1}
    39     44   do_test fuzz2-2.5 {
    40         -  catchsql {SELECT( #239 )}
    41         -} {1 {near "#239": syntax error}}
           45  +  fuzzcatch {SELECT( #239 )}
           46  +} {1}
    42     47   do_test fuzz2-2.6 {
    43         -  catchsql {DELETE FROM AAAAAA WHERE #65 NOT NULL}
    44         -} {1 {near "#65": syntax error}}
           48  +  fuzzcatch {DELETE FROM AAAAAA WHERE #65 NOT NULL}
           49  +} {1}
    45     50   do_test fuzz2-2.7 {
    46         -  catchsql {ATTACH ROUND( 1.0 ) in  AAAAAA . "AAAAAA" AS #122 ISNULL}
    47         -} {1 {invalid name: "ROUND( 1.0 ) in  AAAAAA . "AAAAAA""}}
           51  +  fuzzcatch {ATTACH ROUND( 1.0 ) in  AAAAAA . "AAAAAA" AS #122 ISNULL}
           52  +} {1}
    48     53   do_test fuzz2-2.8 {
    49         -  catchsql {SELECT 1 LIMIT  #122 ISNULL}
    50         -} {1 {near "#122": syntax error}}
           54  +  fuzzcatch {SELECT 1 LIMIT  #122 ISNULL}
           55  +} {1}
    51     56   do_test fuzz2-2.9 {
    52         -  catchsql {CREATE VIEW AAAAAA . "AAAAAA" AS SELECT DISTINCT #162 IS NULL "AAAAAA"}
    53         -} {1 {unknown database AAAAAA}}
           57  +  fuzzcatch {CREATE VIEW AAAAAA . "AAAAAA" AS SELECT DISTINCT #162 IS NULL "AAAAAA"}
           58  +} {1}
    54     59   do_test fuzz2-2.10 {
    55         -  catchsql {DELETE FROM AAAAAA WHERE #202 IS NOT NULL ISNULL}
    56         -} {1 {near "#202": syntax error}}
           60  +  fuzzcatch {DELETE FROM AAAAAA WHERE #202 IS NOT NULL ISNULL}
           61  +} {1}
    57     62   do_test fuzz2-2.11 {
    58         -  catchsql {UPDATE OR IGNORE "AAAAAA" . "AAAAAA" SET "AAAAAA" = NOT #96}
    59         -} {1 {near "#96": syntax error}}
           63  +  fuzzcatch {UPDATE OR IGNORE "AAAAAA" . "AAAAAA" SET "AAAAAA" = NOT #96}
           64  +} {1}
    60     65   do_test fuzz2-2.12 {
    61         -  catchsql {SELECT - #196}
    62         -} {1 {near "#196": syntax error}}
           66  +  fuzzcatch {SELECT - #196}
           67  +} {1}
    63     68   do_test fuzz2-3.0 {
    64         -  catchsql {CREATE TRIGGER "AAAAAA" . "AAAAAA" AFTER UPDATE OF "AAAAAA" , "AAAAAA" ON "AAAAAA" . "AAAAAA" FOR EACH ROW BEGIN UPDATE AAAAAA SET "AAAAAA" = #162;  END}
    65         -} {1 {near "#162": syntax error}}
           69  +  fuzzcatch {CREATE TRIGGER "AAAAAA" . "AAAAAA" AFTER UPDATE OF "AAAAAA" , "AAAAAA" ON "AAAAAA" . "AAAAAA" FOR EACH ROW BEGIN UPDATE AAAAAA SET "AAAAAA" = #162;  END}
           70  +} {1}
    66     71   do_test fuzz2-3.1 {
    67         -  catchsql {CREATE TRIGGER IF NOT EXISTS "AAAAAA" UPDATE ON "AAAAAA" . AAAAAA FOR EACH ROW BEGIN DELETE FROM "AAAAAA" ; INSERT INTO AAAAAA ( "AAAAAA" ) SELECT DISTINCT "AAAAAA" "AAAAAA" , #167 AAAAAA , "AAAAAA" . * ORDER BY "AAAAAA" ASC , x'414141414141' BETWEEN RAISE ( FAIL , "AAAAAA" ) AND AAAAAA ( * ) NOT NULL DESC LIMIT AAAAAA ; REPLACE INTO AAAAAA ( AAAAAA ) VALUES ( AAAAAA ( * ) ) ; END}
    68         -} {1 {near "#167": syntax error}}
           72  +  fuzzcatch {CREATE TRIGGER IF NOT EXISTS "AAAAAA" UPDATE ON "AAAAAA" . AAAAAA FOR EACH ROW BEGIN DELETE FROM "AAAAAA" ; INSERT INTO AAAAAA ( "AAAAAA" ) SELECT DISTINCT "AAAAAA" "AAAAAA" , #167 AAAAAA , "AAAAAA" . * ORDER BY "AAAAAA" ASC , x'414141414141' BETWEEN RAISE ( FAIL , "AAAAAA" ) AND AAAAAA ( * ) NOT NULL DESC LIMIT AAAAAA ; REPLACE INTO AAAAAA ( AAAAAA ) VALUES ( AAAAAA ( * ) ) ; END}
           73  +} {1}
    69     74   do_test fuzz2-3.2 {
    70         -  catchsql {CREATE TEMP TRIGGER IF NOT EXISTS AAAAAA . "AAAAAA" BEFORE UPDATE OF "AAAAAA" ON AAAAAA . "AAAAAA" BEGIN SELECT ALL * , #175 "AAAAAA" FROM "AAAAAA" . AAAAAA;  END}
    71         -} {1 {near "#175": syntax error}}
           75  +  fuzzcatch {CREATE TEMP TRIGGER IF NOT EXISTS AAAAAA . "AAAAAA" BEFORE UPDATE OF "AAAAAA" ON AAAAAA . "AAAAAA" BEGIN SELECT ALL * , #175 "AAAAAA" FROM "AAAAAA" . AAAAAA;  END}
           76  +} {1}
    72     77   do_test fuzz2-4.0 {
    73         -  catchsql {ATTACH DATABASE #168 AS whatever}
    74         -} {1 {near "#168": syntax error}}
           78  +  fuzzcatch {ATTACH DATABASE #168 AS whatever}
           79  +} {1}
    75     80   do_test fuzz2-4.1 {
    76         -  catchsql {DETACH #133}
    77         -} {1 {near "#133": syntax error}}
           81  +  fuzzcatch {DETACH #133}
           82  +} {1}
    78     83   do_test fuzz2-5.0 {
    79         -  catchsql {SELECT 1 LIMIT ( SELECT DISTINCT * , AAAAAA , * , AAAAAA , "AAAAAA" . * FROM "AAAAAA" ON ROUND( 1 ) COLLATE AAAAAA OR "AAAAAA" USING ( AAAAAA , "AAAAAA" ) WHERE ROUND( 1 ) GROUP BY ORDER BY #84 ASC , #44 DESC , ( SELECT "AAAAAA" . * , "AAAAAA" . * FROM , ( ) "AAAAAA" USING ( )}
    80         -} {1 {near ",": syntax error}}
           84  +  fuzzcatch {SELECT 1 LIMIT ( SELECT DISTINCT * , AAAAAA , * , AAAAAA , "AAAAAA" . * FROM "AAAAAA" ON ROUND( 1 ) COLLATE AAAAAA OR "AAAAAA" USING ( AAAAAA , "AAAAAA" ) WHERE ROUND( 1 ) GROUP BY ORDER BY #84 ASC , #44 DESC , ( SELECT "AAAAAA" . * , "AAAAAA" . * FROM , ( ) "AAAAAA" USING ( )}
           85  +} {1}
    81     86   do_test fuzz2-5.1 {
    82         -  catchsql {SELECT 1 WHERE 1 == AAAAAA ( * ) BETWEEN + - ~ + "AAAAAA" . AAAAAA | RAISE ( IGNORE ) COLLATE AAAAAA NOT IN ( SELECT DISTINCT "AAAAAA" . * , * , * WHERE ( SELECT ALL AAAAAA AS "AAAAAA" HAVING CAST ( "AAAAAA" . "AAAAAA" . "AAAAAA" AS AAAAAA ) ORDER BY , , IS NULL ASC , ~ AND DESC LIMIT ( ( "AAAAAA" ) NOT BETWEEN ( ) NOT IN ( ) AND AAAAAA ( ) IS NOT NULL ) OFFSET AAAAAA ( ALL , , ) ) GROUP BY ORDER BY "AAAAAA" . AAAAAA ASC , NULL IN ( SELECT UNION ALL SELECT ALL WHERE HAVING ORDER BY LIMIT UNION SELECT DISTINCT FROM ( ) WHERE + HAVING >> ORDER BY LIMIT . . , "AAAAAA" ) , CAST ( ~ "AAAAAA" . AAAAAA AS "AAAAAA" AAAAAA "AAAAAA" ( + 4294967295 , - 4294967296.0 ) ) ASC LIMIT AAAAAA INTERSECT SELECT ALL * GROUP BY , AAAAAA ( DISTINCT , ) != #241 NOT IN ( , , ) , , CTIME_KW HAVING AAAAAA ORDER BY #103 DESC , #81 ASC LIMIT AAAAAA OFFSET ~ AAAAAA ( ALL AAAAAA . AAAAAA >= AAAAAA . "AAAAAA" . "AAAAAA" ) ) NOTNULL NOT NULL}
    83         -} {1 {near ",": syntax error}}
           87  +  fuzzcatch {SELECT 1 WHERE 1 == AAAAAA ( * ) BETWEEN + - ~ + "AAAAAA" . AAAAAA | RAISE ( IGNORE ) COLLATE AAAAAA NOT IN ( SELECT DISTINCT "AAAAAA" . * , * , * WHERE ( SELECT ALL AAAAAA AS "AAAAAA" HAVING CAST ( "AAAAAA" . "AAAAAA" . "AAAAAA" AS AAAAAA ) ORDER BY , , IS NULL ASC , ~ AND DESC LIMIT ( ( "AAAAAA" ) NOT BETWEEN ( ) NOT IN ( ) AND AAAAAA ( ) IS NOT NULL ) OFFSET AAAAAA ( ALL , , ) ) GROUP BY ORDER BY "AAAAAA" . AAAAAA ASC , NULL IN ( SELECT UNION ALL SELECT ALL WHERE HAVING ORDER BY LIMIT UNION SELECT DISTINCT FROM ( ) WHERE + HAVING >> ORDER BY LIMIT . . , "AAAAAA" ) , CAST ( ~ "AAAAAA" . AAAAAA AS "AAAAAA" AAAAAA "AAAAAA" ( + 4294967295 , - 4294967296.0 ) ) ASC LIMIT AAAAAA INTERSECT SELECT ALL * GROUP BY , AAAAAA ( DISTINCT , ) != #241 NOT IN ( , , ) , , CTIME_KW HAVING AAAAAA ORDER BY #103 DESC , #81 ASC LIMIT AAAAAA OFFSET ~ AAAAAA ( ALL AAAAAA . AAAAAA >= AAAAAA . "AAAAAA" . "AAAAAA" ) ) NOTNULL NOT NULL}
           88  +} {1}
    84     89   do_test fuzz2-5.2 {
    85         -  catchsql {SELECT 1 WHERE 1 == AAAAAA ( * ) BETWEEN + - ~ + "AAAAAA" . AAAAAA | RAISE ( IGNORE ) COLLATE AAAAAA NOT IN ( SELECT DISTINCT "AAAAAA" . * , * , * WHERE ( SELECT ALL AAAAAA AS "AAAAAA" HAVING CAST ( "AAAAAA" . "AAAAAA" . "AAAAAA" AS AAAAAA ) ORDER BY , , IS NULL ASC , ~ AND DESC LIMIT ( ( "AAAAAA" ) NOT BETWEEN ( ) NOT IN ( ) AND AAAAAA ( ) IS NOT NULL ) OFFSET AAAAAA ( ALL , , ) ) GROUP BY ORDER BY "AAAAAA" . AAAAAA ASC , NULL IN ( SELECT UNION ALL SELECT ALL WHERE HAVING ORDER BY LIMIT UNION SELECT DISTINCT FROM ( ) WHERE + HAVING >> ORDER BY LIMIT . . , "AAAAAA" ) , CAST ( ~ "AAAAAA" . AAAAAA AS "AAAAAA" AAAAAA "AAAAAA" ( + 4294967295 , - 4294967296.0 ) ) ASC LIMIT AAAAAA INTERSECT SELECT ALL * GROUP BY , AAAAAA ( DISTINCT , ) != #241 NOT IN ( , , ) , , CTIME_KW HAVING AAAAAA ORDER BY #103 DESC , #81 ASC LIMIT AAAAAA OFFSET ~ AAAAAA ( ALL AAAAAA . AAAAAA >= AAAAAA . "AAAAAA" . "AAAAAA" ) ) NOTNULL NOT NULL}
    86         -} {1 {near ",": syntax error}}
           90  +  fuzzcatch {SELECT 1 WHERE 1 == AAAAAA ( * ) BETWEEN + - ~ + "AAAAAA" . AAAAAA | RAISE ( IGNORE ) COLLATE AAAAAA NOT IN ( SELECT DISTINCT "AAAAAA" . * , * , * WHERE ( SELECT ALL AAAAAA AS "AAAAAA" HAVING CAST ( "AAAAAA" . "AAAAAA" . "AAAAAA" AS AAAAAA ) ORDER BY , , IS NULL ASC , ~ AND DESC LIMIT ( ( "AAAAAA" ) NOT BETWEEN ( ) NOT IN ( ) AND AAAAAA ( ) IS NOT NULL ) OFFSET AAAAAA ( ALL , , ) ) GROUP BY ORDER BY "AAAAAA" . AAAAAA ASC , NULL IN ( SELECT UNION ALL SELECT ALL WHERE HAVING ORDER BY LIMIT UNION SELECT DISTINCT FROM ( ) WHERE + HAVING >> ORDER BY LIMIT . . , "AAAAAA" ) , CAST ( ~ "AAAAAA" . AAAAAA AS "AAAAAA" AAAAAA "AAAAAA" ( + 4294967295 , - 4294967296.0 ) ) ASC LIMIT AAAAAA INTERSECT SELECT ALL * GROUP BY , AAAAAA ( DISTINCT , ) != #241 NOT IN ( , , ) , , CTIME_KW HAVING AAAAAA ORDER BY #103 DESC , #81 ASC LIMIT AAAAAA OFFSET ~ AAAAAA ( ALL AAAAAA . AAAAAA >= AAAAAA . "AAAAAA" . "AAAAAA" ) ) NOTNULL NOT NULL}
           91  +} {1}
    87     92   do_test fuzz2-5.3 {
    88         -  catchsql {UPDATE "AAAAAA" SET "AAAAAA" = - EXISTS ( SELECT DISTINCT * , * ORDER BY #202 ASC , #147 , ~ AAAAAA . "AAAAAA" ASC LIMIT AAAAAA . "AAAAAA" , RAISE ( ABORT , AAAAAA ) UNION ALL SELECT DISTINCT AAAAAA . * , * FROM ( SELECT DISTINCT}
    89         -} {1 {near "DISTINCT": syntax error}}
           93  +  fuzzcatch {UPDATE "AAAAAA" SET "AAAAAA" = - EXISTS ( SELECT DISTINCT * , * ORDER BY #202 ASC , #147 , ~ AAAAAA . "AAAAAA" ASC LIMIT AAAAAA . "AAAAAA" , RAISE ( ABORT , AAAAAA ) UNION ALL SELECT DISTINCT AAAAAA . * , * FROM ( SELECT DISTINCT}
           94  +} {1}
    90     95   do_test fuzz2-5.4 {
    91         -  catchsql {REPLACE INTO AAAAAA SELECT DISTINCT "AAAAAA" . * WHERE AAAAAA ( AAAAAA ( ) ) GROUP BY AAAAAA . AAAAAA . "AAAAAA" IN "AAAAAA" | AAAAAA ( ALL , ) ORDER BY #238, #92 DESC LIMIT 0 OFFSET - RAISE ( IGNORE ) NOT NULL > RAISE ( IGNORE ) IS NULL}
    92         -} {1 {near "#92": syntax error}}
           96  +  fuzzcatch {REPLACE INTO AAAAAA SELECT DISTINCT "AAAAAA" . * WHERE AAAAAA ( AAAAAA ( ) ) GROUP BY AAAAAA . AAAAAA . "AAAAAA" IN "AAAAAA" | AAAAAA ( ALL , ) ORDER BY #238, #92 DESC LIMIT 0 OFFSET - RAISE ( IGNORE ) NOT NULL > RAISE ( IGNORE ) IS NULL}
           97  +} {1}
    93     98   do_test fuzz2-5.5 {
    94         -  catchsql {SELECT ALL * GROUP BY EXISTS ( SELECT "AAAAAA" . * , AAAAAA ( * ) AS AAAAAA FROM "AAAAAA" . "AAAAAA" AS "AAAAAA" USING ( AAAAAA , "AAAAAA" , "AAAAAA" ) WHERE AAAAAA ( DISTINCT ) - RAISE ( FAIL , "AAAAAA" ) HAVING "AAAAAA" . "AAAAAA" . AAAAAA ORDER BY #182 , #55 ) BETWEEN EXISTS ( SELECT ALL * FROM ( ( }
    95         -} {1 {near " ": syntax error}}
           99  +  fuzzcatch {SELECT ALL * GROUP BY EXISTS ( SELECT "AAAAAA" . * , AAAAAA ( * ) AS AAAAAA FROM "AAAAAA" . "AAAAAA" AS "AAAAAA" USING ( AAAAAA , "AAAAAA" , "AAAAAA" ) WHERE AAAAAA ( DISTINCT ) - RAISE ( FAIL , "AAAAAA" ) HAVING "AAAAAA" . "AAAAAA" . AAAAAA ORDER BY #182 , #55 ) BETWEEN EXISTS ( SELECT ALL * FROM ( ( }
          100  +} {1}
    96    101   
    97    102   finish_test

Changes to test/interrupt.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is the sqlite_interrupt() API.
    13     13   #
    14         -# $Id: interrupt.test,v 1.13 2006/07/17 00:02:46 drh Exp $
           14  +# $Id: interrupt.test,v 1.14 2007/05/15 16:51:37 drh Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   set DB [sqlite3_connection_pointer db]
    20     20   
    21     21   # Compute a checksum on the entire database.
................................................................................
   176    176       catchsql $sql
   177    177     } {1 interrupted}
   178    178   }
   179    179   
   180    180   # Interrupt during parsing
   181    181   #
   182    182   do_test interrupt-5.1 {
   183         -  proc fake_interrupt {args} {sqlite3_interrupt $::DB; return SQLITE_OK}
   184         -  db collation_needed fake_interrupt
   185         -  catchsql {
   186         -    CREATE INDEX fake ON fake1(a COLLATE fake_collation, b, c DESC);
          183  +  proc fake_interrupt {args} {
          184  +    db collate fake_collation no-op
          185  +    sqlite3_interrupt db
          186  +    return SQLITE_OK
   187    187     }
   188         -} {1 interrupt}
   189         -do_test interrupt-5.2 {
   190         -  proc fake_interrupt {args} {db interrupt; return SQLITE_OK}
   191    188     db collation_needed fake_interrupt
   192    189     catchsql {
   193    190       CREATE INDEX fake ON fake1(a COLLATE fake_collation, b, c DESC);
   194    191     }
   195    192   } {1 interrupt}
   196    193   
   197    194   finish_test