1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix problems in ALTER TABLE that occur when column or table names are

invalid UTF encodings. (CVS 4000)

FossilOrigin-Name: 9ff382f4584ff685a78b39f24424319709efb382
This commit is contained in:
drh
2007-05-15 03:56:49 +00:00
parent e279195400
commit 4e5dd85135
7 changed files with 79 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\stypo\sin\sa\scomment.\s\sTicket\s#2359.\s(CVS\s3999) C Fix\sproblems\sin\sALTER\sTABLE\sthat\soccur\swhen\scolumn\sor\stable\snames\sare\ninvalid\sUTF\sencodings.\s(CVS\s4000)
D 2007-05-15T02:45:19 D 2007-05-15T03:56:49
F Makefile.in 87b200ad9970907f76df734d29dff3d294c10935 F Makefile.in 87b200ad9970907f76df734d29dff3d294c10935
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -57,14 +57,14 @@ F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2
F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc
F sqlite3.def a96c1d0d39362b763d2ddba220a32da41a15c4b4 F sqlite3.def a96c1d0d39362b763d2ddba220a32da41a15c4b4
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
F src/alter.c ca8fc4a3c7359379598dc12589b65c32eb88defd F src/alter.c 357378a0c09b654d9ae3764e58ba1034da4552b5
F src/analyze.c e8fcb1c35ace8418615eb18d9601f321ac86b2ec F src/analyze.c e8fcb1c35ace8418615eb18d9601f321ac86b2ec
F src/attach.c ba628db0c2b6a362f036d017bf1196cdfe4ebb37 F src/attach.c ba628db0c2b6a362f036d017bf1196cdfe4ebb37
F src/auth.c 5ea90bc93dfea46e9fe4bf531e14c7cd98219ecb F src/auth.c 5ea90bc93dfea46e9fe4bf531e14c7cd98219ecb
F src/btree.c 0c2f9b06c90d7c59925c03153c9d47fd739c8ca5 F src/btree.c 0c2f9b06c90d7c59925c03153c9d47fd739c8ca5
F src/btree.h 1d527bf61ed176f980c34999d5793a0fd45dcf8c F src/btree.h 1d527bf61ed176f980c34999d5793a0fd45dcf8c
F src/btreeInt.h cb3c0e9eb842d06079a62cdf3492c90c5db7ba75 F src/btreeInt.h cb3c0e9eb842d06079a62cdf3492c90c5db7ba75
F src/build.c 8e744caf66d4411143985863108736887096d634 F src/build.c a27a21a23fb08db0a9d6711e296f54b04fa25cee
F src/callback.c 9c12535669a638f90a67e10440b99c7b93c0fbf4 F src/callback.c 9c12535669a638f90a67e10440b99c7b93c0fbf4
F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675 F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
F src/date.c 6049db7d5a8fdf2c677ff7d58fa31d4f6593c988 F src/date.c 6049db7d5a8fdf2c677ff7d58fa31d4f6593c988
@@ -107,7 +107,7 @@ F src/sqlite3ext.h 7d0d363ea7327e817ef0dfe1b7eee1f171b72890
F src/sqliteInt.h c31c9526bc602c3c71ddc45c548e987530826f11 F src/sqliteInt.h c31c9526bc602c3c71ddc45c548e987530826f11
F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d
F src/tclsqlite.c f425c7583665ef78dd8397b2de0b8e0028e80ce2 F src/tclsqlite.c f425c7583665ef78dd8397b2de0b8e0028e80ce2
F src/test1.c 16938b7e76469abf957745743dd0287d5dee476d F src/test1.c 84c841e1088f743200b87581506e93f70344bd32
F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88 F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88
F src/test3.c 946ea9d1a8c928656e3c70f0a2fcb8e733a15e86 F src/test3.c 946ea9d1a8c928656e3c70f0a2fcb8e733a15e86
F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25 F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25
@@ -145,7 +145,7 @@ F src/where.c f3920748cc650fc25ac916215500bdb90dee568e
F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617 F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/all.test 93a40a7612b3c5e6efd1f5b98496a8b02a45cfdb F test/all.test 93a40a7612b3c5e6efd1f5b98496a8b02a45cfdb
F test/alter.test 0e69c016b5aacd4cc692e63115655c885bfe3c22 F test/alter.test 1513354e75cad76180d2ac06a20665193210c0d7
F test/alter2.test 50c3f554b8236d179d72511c0a4f23c5eb7f2af3 F test/alter2.test 50c3f554b8236d179d72511c0a4f23c5eb7f2af3
F test/alter3.test a6eec8f454be9b6ce73d8d7dc711453675a10ce7 F test/alter3.test a6eec8f454be9b6ce73d8d7dc711453675a10ce7
F test/altermalloc.test 19323e0f452834044c27a54c6e78554d706de7ba F test/altermalloc.test 19323e0f452834044c27a54c6e78554d706de7ba
@@ -249,7 +249,7 @@ F test/fts2m.test 4b30142ead6f3ed076e880a2a464064c5ad58c51
F test/fts2n.test a70357e72742681eaebfdbe9007b87ff3b771638 F test/fts2n.test a70357e72742681eaebfdbe9007b87ff3b771638
F test/func.test bf30bac1c5ce10448ab739994268cf18f8b3fa30 F test/func.test bf30bac1c5ce10448ab739994268cf18f8b3fa30
F test/fuzz.test f5c67c3bbf2031d6d1c08a546569831d53dc6452 F test/fuzz.test f5c67c3bbf2031d6d1c08a546569831d53dc6452
F test/fuzz2.test fdbea571808441c12c91e9cd038eb77b4692d42b F test/fuzz2.test f1866329c9d0869297fb47fd1b4f597d5b66ac97
F test/hook.test 7e7645fd9a033f79cce8fdff151e32715e7ec50a F test/hook.test 7e7645fd9a033f79cce8fdff151e32715e7ec50a
F test/icu.test e6bfae7f625c88fd14df6f540fe835bdfc1e4329 F test/icu.test e6bfae7f625c88fd14df6f540fe835bdfc1e4329
F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d
@@ -491,7 +491,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 5af49a57d4866be21c0206f34584bcc63adc1315 P 1fbbc108a9e7ad1dc22c08ee990e2b6b949784eb
R 93a3d51fc25837371e9b0e6fd514aa55 R b8fe54c7bac8048083b2ee052aff15ca
U drh U drh
Z 35fee69111bd42bfa0668ba9070de64e Z e8c0d1effc885ae48b4a6dcdd97879b1

View File

@@ -1 +1 @@
1fbbc108a9e7ad1dc22c08ee990e2b6b949784eb 9ff382f4584ff685a78b39f24424319709efb382

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that used to generate VDBE code ** This file contains C code routines that used to generate VDBE code
** that implements the ALTER TABLE command. ** that implements the ALTER TABLE command.
** **
** $Id: alter.c,v 1.23 2007/05/08 12:37:46 danielk1977 Exp $ ** $Id: alter.c,v 1.24 2007/05/15 03:56:49 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include <ctype.h> #include <ctype.h>
@@ -273,6 +273,9 @@ void sqlite3AlterRenameTable(
Table *pTab; /* Table being renamed */ Table *pTab; /* Table being renamed */
char *zName = 0; /* NULL-terminated version of pName */ char *zName = 0; /* NULL-terminated version of pName */
sqlite3 *db = pParse->db; /* Database connection */ sqlite3 *db = pParse->db; /* Database connection */
int i; /* Loop counter */
int nTabName; /* Number of UTF-8 characters in zTabName */
const char *zTabName; /* Original name of the table */
Vdbe *v; Vdbe *v;
#ifndef SQLITE_OMIT_TRIGGER #ifndef SQLITE_OMIT_TRIGGER
char *zWhere = 0; /* Where clause to locate temp triggers */ char *zWhere = 0; /* Where clause to locate temp triggers */
@@ -334,6 +337,12 @@ void sqlite3AlterRenameTable(
sqlite3BeginWriteOperation(pParse, 0, iDb); sqlite3BeginWriteOperation(pParse, 0, iDb);
sqlite3ChangeCookie(db, v, iDb); sqlite3ChangeCookie(db, v, iDb);
/* figure out how many UTF-8 characters are in zName */
zTabName = pTab->zName;
for(i=nTabName=0; zTabName[i]; i++){
if( (zTabName[i]&0xc0)!=0x80 ) nTabName++;
}
/* Modify the sqlite_master table to use the new table name. */ /* Modify the sqlite_master table to use the new table name. */
sqlite3NestedParse(pParse, sqlite3NestedParse(pParse,
"UPDATE %Q.%s SET " "UPDATE %Q.%s SET "
@@ -348,7 +357,7 @@ void sqlite3AlterRenameTable(
"name = CASE " "name = CASE "
"WHEN type='table' THEN %Q " "WHEN type='table' THEN %Q "
"WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN " "WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN "
"'sqlite_autoindex_' || %Q || substr(name, %d+18,10) " "'sqlite_autoindex_' || %Q || substr(name,%d+18,10) "
"ELSE name END " "ELSE name END "
"WHERE tbl_name=%Q AND " "WHERE tbl_name=%Q AND "
"(type='table' OR type='index' OR type='trigger');", "(type='table' OR type='index' OR type='trigger');",
@@ -356,7 +365,7 @@ void sqlite3AlterRenameTable(
#ifndef SQLITE_OMIT_TRIGGER #ifndef SQLITE_OMIT_TRIGGER
zName, zName,
#endif #endif
zName, strlen(pTab->zName), pTab->zName zName, nTabName, zTabName
); );
#ifndef SQLITE_OMIT_AUTOINCREMENT #ifndef SQLITE_OMIT_AUTOINCREMENT

View File

@@ -22,7 +22,7 @@
** COMMIT ** COMMIT
** ROLLBACK ** ROLLBACK
** **
** $Id: build.c,v 1.430 2007/05/12 15:00:15 drh Exp $ ** $Id: build.c,v 1.431 2007/05/15 03:56:49 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include <ctype.h> #include <ctype.h>
@@ -1562,13 +1562,16 @@ void sqlite3EndTable(
#ifndef SQLITE_OMIT_ALTERTABLE #ifndef SQLITE_OMIT_ALTERTABLE
if( !p->pSelect ){ if( !p->pSelect ){
const char *zName = (const char *)pParse->sNameToken.z; const char *zName = (const char *)pParse->sNameToken.z;
int nName; int nName, i, nUtfChar;
assert( !pSelect && pCons && pEnd ); assert( !pSelect && pCons && pEnd );
if( pCons->z==0 ){ if( pCons->z==0 ){
pCons = pEnd; pCons = pEnd;
} }
nName = (const char *)pCons->z - zName; nName = (const char *)pCons->z - zName;
p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName); for(i=nUtfChar=0; i<nName; i++){
if( (zName[i]&0xc0)!=0x80 ) nUtfChar++;
}
p->addColOffset = 13 + nUtfChar;
} }
#endif #endif
} }

View File

@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated ** is not included in the SQLite library. It is used for automated
** testing of the SQLite library. ** testing of the SQLite library.
** **
** $Id: test1.c,v 1.252 2007/05/08 20:37:39 drh Exp $ ** $Id: test1.c,v 1.253 2007/05/15 03:56:50 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include "tcl.h" #include "tcl.h"
@@ -338,6 +338,8 @@ static int test_exec(
Tcl_DString str; Tcl_DString str;
int rc; int rc;
char *zErr = 0; char *zErr = 0;
char *zSql;
int i, j;
char zBuf[30]; char zBuf[30];
if( argc!=3 ){ if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -346,7 +348,18 @@ static int test_exec(
} }
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR; if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
Tcl_DStringInit(&str); Tcl_DStringInit(&str);
rc = sqlite3_exec(db, argv[2], exec_printf_cb, &str, &zErr); zSql = sqlite3_mprintf("%s", argv[2]);
for(i=j=0; zSql[i];){
if( zSql[i]=='%' ){
zSql[j++] = (testHexToInt(zSql[i+1])<<4) + testHexToInt(zSql[i+2]);
i += 3;
}else{
zSql[j++] = zSql[i++];
}
}
zSql[j] = 0;
rc = sqlite3_exec(db, zSql, exec_printf_cb, &str, &zErr);
sqlite3_free(zSql);
sprintf(zBuf, "%d", rc); sprintf(zBuf, "%d", rc);
Tcl_AppendElement(interp, zBuf); Tcl_AppendElement(interp, zBuf);
Tcl_AppendElement(interp, rc==SQLITE_OK ? Tcl_DStringValue(&str) : zErr); Tcl_AppendElement(interp, rc==SQLITE_OK ? Tcl_DStringValue(&str) : zErr);

View File

@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The # This file implements regression tests for SQLite library. The
# focus of this script is testing the ALTER TABLE statement. # focus of this script is testing the ALTER TABLE statement.
# #
# $Id: alter.test,v 1.21 2007/05/15 00:09:13 drh Exp $ # $Id: alter.test,v 1.22 2007/05/15 03:56:50 drh Exp $
# #
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
@@ -97,6 +97,7 @@ do_test alter-1.2 {
# Make some changes # Make some changes
# #
integrity_check alter-1.3.0
do_test alter-1.3 { do_test alter-1.3 {
execsql { execsql {
ALTER TABLE [T1] RENAME to [-t1-]; ALTER TABLE [T1] RENAME to [-t1-];
@@ -665,12 +666,41 @@ ifcapable trigger {
} {{}} } {{}}
} }
do_test alter-9.2 { do_test alter-9.2 {
execsql { execsql {
SELECT SQLITE_RENAME_TABLE(0,0); SELECT SQLITE_RENAME_TABLE(0,0);
SELECT SQLITE_RENAME_TABLE(10,20); SELECT SQLITE_RENAME_TABLE(10,20);
SELECT SQLITE_RENAME_TABLE("foo", "foo"); SELECT SQLITE_RENAME_TABLE("foo", "foo");
} }
} {{} {} {}} } {{} {} {}}
#------------------------------------------------------------------------
# alter-10.X - Make sure ALTER TABLE works with multi-byte UTF-8 characters
# in the names.
#
do_test alter-10.1 {
execsql "CREATE TABLE xyz(x UNIQUE)"
execsql "ALTER TABLE xyz RENAME TO xyz\u1234abc"
execsql {SELECT name FROM sqlite_master WHERE name LIKE 'xyz%'}
} [list xyz\u1234abc]
do_test alter-10.2 {
execsql {SELECT name FROM sqlite_master WHERE name LIKE 'sqlite_autoindex%'}
} [list sqlite_autoindex_xyz\u1234abc_1]
do_test alter-10.3 {
execsql "ALTER TABLE xyz\u1234abc RENAME TO xyzabc"
execsql {SELECT name FROM sqlite_master WHERE name LIKE 'xyz%'}
} [list xyzabc]
do_test alter-10.4 {
execsql {SELECT name FROM sqlite_master WHERE name LIKE 'sqlite_autoindex%'}
} [list sqlite_autoindex_xyzabc_1]
do_test alter-11.1 {
sqlite3_exec db {CREATE TABLE t11(%c6%c6)}
execsql {
ALTER TABLE t11 ADD COLUMN abc;
}
catchsql {
ALTER TABLE t11 ADD COLUMN abc;
}
} {1 {duplicate column name: abc}}
finish_test finish_test

View File

@@ -12,7 +12,7 @@
# #
# This file checks error recovery from malformed SQL strings. # This file checks error recovery from malformed SQL strings.
# #
# $Id: fuzz2.test,v 1.1 2007/05/11 00:20:08 drh Exp $ # $Id: fuzz2.test,v 1.2 2007/05/15 03:56:50 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@@ -80,10 +80,10 @@ do_test fuzz2-5.0 {
} {1 {near ",": syntax error}} } {1 {near ",": syntax error}}
do_test fuzz2-5.1 { do_test fuzz2-5.1 {
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} 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}
} {1 {near "#81": syntax error}} } {1 {near ",": syntax error}}
do_test fuzz2-5.2 { do_test fuzz2-5.2 {
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} 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}
} {1 {near "#81": syntax error}} } {1 {near ",": syntax error}}
do_test fuzz2-5.3 { do_test fuzz2-5.3 {
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} 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}
} {1 {near "DISTINCT": syntax error}} } {1 {near "DISTINCT": syntax error}}