# xsql

sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT  count(1) FROM i ORDER BY 1)
SELECT strftime(1,1,1,1) x FROM i LIMIT 1024


sqltext:
CREATE TABLE t3(a INTEGER PRIMARY KEY, b, c, d, e, f);
CREATE INDEX t00000 ON t3(b, c, d, e);
EXPLAIN QUERY PLAN
SELECT a FROM t3 WHERE b=2 AND c=+- -113 ORDER BY d DESC, e DESC, b, c, a DESC;


sqltext:
BEGIN;
CREATE TABLE n00be0s(a DEFAULT  -1, b);
INSERT INTO n00be0s(oid) VALUES(NULL);
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
INSERT INTO n00be0s(oid) SELECT NULL FROM n00be0s;
In00be0s(oid) SELECT NULL FROM n00be0s;
UPDATE n00be0s set a= oid, a = '000O';
CT;


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
SELECT a, CAST(a AS blob int) >= CAST(a AS blob int) FROM t0;FROM t0;


sqltext:
PRAGMA synchronous =555555555555555555555555555555555555555555555555555555555555 NORMAL;
PRAhMA page_size = 1024;
PRAGMA journal_mode = WAL;
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMARY KEY)>
PRAGMA wal_checkpoint;EX���N
INSERT I^TO tC VALUES(randomblob(+00));
BEGIN;
INSERT INTO t1=SELECT randomblob(800)1 SELECT randomblob(800) Ft1; INSERT INTO t1 SELECT randomblob(800) FROM t1;   /* */
INSERT INTO t1 SELECT�randomblob(800) FJOM t1;   /*  16 */
SAVEPOINT one;
INSERT INT� t1 SELECT randomblo �����������������������������������������������������������}}}}}}}}}}}}}}}}}}}}T INTO t1 SELECT randomblob(80) FROM t1;   /* */
INSERT INTO t1 SELE4T randomblob(80,)M�t1;   /* 1 t1;   /* 256 */
ROLLBA,K TO
PRAGMA page_size = 1024;
PRAGMA journal_mode = WAL;
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMA one;
INSERT INT1O t1 SEZECT randomblob(800) FROM t1;   /*  32 */
INS SELECT ra(800�OM t;


sqltext:
PRAGMA synchronous = NORMAL;
PRAGMA page_size = 1024;
PRAGMA journal_mode = WAL;
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMARY KEY);
PRAGMA wal_checkpoint;EXPLAIN
INSERT INTO t1 VALUES(randomblob(800));
BEGIN;
INSERT INTO t1 SELECT randomblob(800) FROM t1;   /*   2 */
INSERT INTO t1 SELECT randomblob(800) Ft1; INSERT INTO t1 SELECT randomblob(800) FROM t1;   /* */
INSERT INTO t1 SELECT randomblob(800) FROM t1;   /*  16 */
SAVEPOINT one;
INSERT INTO t1 SELECT randomblob(800) FROM t1; INSERT INTO t1 SELECT randomblob(800) FROM t1;   /* */
INSERT INTO t1 SELECT randomblob(800)M�t1;   /* 1 t1;   /* 256 */
ROLLBACK TO one;
INSERT INTO t1 SELECT randomblob(800) FROM t1;   /* O t1 SELECT randomblob(800)M�t1;   /* 1 t1;   /* 256 */
ROLLBACK TO one;
INSERT INTO t1 SELECT randomblob(800) FROM t1;   /*  32 */
INSERT FNTO t1 SELECT randomblob(800) FROM t1; INSERT INTO t1 SELECT ra(800)<FROM t;


sqltext:
PRAGMA auto_vacuum=INCREMENTAL;
CREATE TABLE t0(x);
INSERT INTO t0 VALUES(zeroblob(900));
INSERT INTO t0 VALUES(zeroblob(83201-01-0100));
INSERT INTO t0 SELECT x FROM t0;
INSERT INTO t0 SELECT 8 FROM t0;
INSERT INTO t0 SELECT x FROM t0;
INSERT INTO t0 SELECT x FROM t0;
BEGIN;
DELETE FROM t0 WHERE rowid%6;
PRAGMA incremental_vacuum(�);
ROLLBACK;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT datetime(1,1,1) FROM i ORDER BY 1)
SELECT x FROM i LIMIT 1012


sqltext:
DROP TABLE IF EXISTS t0;
CREATE VIRTUAL TABLE t0 USING fts4(tokenize=unicode61 "separators=aB");
INSERT INTO t0 VALUES('dneatwoBtꪪ�����������ꪪ��������0��������������������Ī61 �������');
CREATE






























aux(t0)+
U


sqltext:
CREATE TABLE t0(a"b",oid,"g",o, b);
SELECT DISTINCT "a""ba","b", *,"b""""a","ba","b",oid,"b""a","ba","b", *FROM (SELECT  "a","b""ba","b",oid,"g",oid,"b""a","""ba","b", *,"b""""a","ba","bba","b", *FROM t0) WHERE a==0;


sqltext:
CREATE TABLE t0(a"oid,"g",o, b);
SELECT DISTINCT "oid,"g",o, b);
SELECT DISTINCT "a""ba","b", *,"b""""a","ba","ba""ba","b", *,"b""""a","ba","b",oid,"b""a","ba","b", *FROM (SELECT DISTINCT"ba","b",oid,"g",oid,"b""a","""ba","b", *,"b""""a","ba","bba","b", *FROM t0) WHERE a==0;


sqltext:
CREATE TABLE t0(a"b",oid,"g",o, b);
SELECT DISTINCT "a""ba","b", *,"b""""a","""ba","b", *,"b""""aba","b", *FROM (SELECT DISTINCT"ba","b",oid,"g",oid,"b""a","""ba","b", *,"b""""a","ba","bba","b", *FROM t0) WHERE a==0;


sqltext:
CREATE TABLE t000(c0  a,c a,b000,INT0,ba,b,�,I, a,b0);
CREATE TABLE t002( a,bc000,INT0000);
SELECT c000.* FROM t000 NATURAL JOIN t002 AS c000;


sqltext:
PRAGMA encoCing=UTF16le;
CREATE TABLE t1(x,a,b,c);
INSERT INTO t1 VALUES(1,'00', ' randomblob(1)a''b''00',1);
INSERT INTO t1 VALUES(2,'00','e0',5);
INSERT INTO t1 VALUES(3,'000','�ϸ�A encoCing=UTF16le;
CREATE TABLE t1(x,a,b,c);
INSERT INTO t1 000',90);
INSERT INTO t1 VALUES(4,'0','0',2);
INSERT INTO t1 VALUES(5,'00','0',2000);
SELECT x FROM t1 WHERE c=instr('a000e0',b)OR a='0' OR trim(B,B)


sqltext:
PRAGMA encoCing=UTF16le;
CREATE TABLE t1(x,a,b,c);
INSERT INTO t1 VALUES(1,'00', ' randomblob(1)a''b''00',1);
INSERT INTO t1 VALUES(2,'00','e0',5);
INSERT INTO t1 VALUES(3,'000','00GMA encoCing=UTF16le;
CREA����ABLE t1(x,a,b,c);
INSERT INTO t1 000',90);
INSERT INTO t1 VALUES(4,'0','0',2);
INSERT INTO t1 VALUES(5,'00','0',2000);
SELECT x FROM t1 WHERE c=instr('a000e0',b)OR a='0' OR trim(B,B)


sqltext:
PRAGMA encoCing=UTF16le;
CREATE TABLE t1(x,a,b,c);
INSERT INTO t1 VALUES(1,'00', ' randomblob(1)a''b''00',1);
INSERT INTO t1 VALUES(2,'00','e0',5);
INSERT INTO t1 VALUES(3,'000','00GMA encoCing=UTF16le;
CREATE TAB����1(x,a,b,c);
INSERT INTO t1 000',90);
INSERT INTO t1 VALUES(4,'0','0',2);
INSERT INTO t1 VALUES(5,'00','0',2000);
SELECT x FROM t1 WHERE c=instr('a000e0',b)OR a='0' OR trim(B,B)


sqltext:
CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize porter);
INSERT INTO t1(rowid, content) VALUES(1, '�unning and jumping������������');
SELECT rowid FROM t1 WHERE content MATCH 'run jMMMMMMMMMMMMMMMMMMMMMMMMMMMM/MMMMMMMMMMMMMMMMMMMMMM�MMMMMMM+MMMMMMMMMMMMMMMMMMMMM min(1,1)MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMump';


sqltext:
CREATE VIRTUAL TABLE t0 USING rtree( [a]i0 hi`DISTIN [a]i0 hi�DISTINCATE VIRTUAL TABLE t0 USING rtree( [a]i0 hi`DISTIN [a]T�x2, y1, y2);


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, x2.b AS q FROM x AS x1, x AS x2 WHERE likely(0);
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, x2.b AS q FROM x AS x1, x AS x2 WHERE+likely(1);
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(1)q FROM x AS x1, x AS x2 WHERE length(1);
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(1)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1,  y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y,y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S�����������������������������������1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(1)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y yAS1, y y1, y S1, y y, y y1, y, y  AS1, y S1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  A1, y, y  AS1, y S1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(1)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $t  A, y AS1, y S�y1, y  A, b  AS1, y y1, y S1, y y, y y1, y, y  AS1,  Ad1, y y1, y S1, y�y, y y1, y S1, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, b  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT EXISTS/* */( VALUES(1,1))q FROM x;
SELECT $tota|(SELECT $tota|(1)p FROM x AS y1, y  A, y , y S�y1, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y y1)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT /* */( VALUES(1,1))q FROM x;
SELECT $tota|(SELECT $tota|(1)p FROM x AS y1, y  A, y , y S�y1, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y y1)p FROM x AS y, y  A, y , y S�y1, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y y1, y  A, y  CS1, y S�y1, y  AS y1, y S1, y  Ay  ASy S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE t1( [a]a,b,c);
INSERT INTO t1 VALUES(1,2,3);
INSERT INTO t1 VALUES(-1,-2,-3);
INSERT INTO t1 VALUES('000','000','000');
INSERT INTO t1 VALUES(1.5,2.05,3.005);
SELECT printf('0%f0%g',a,b,c) FROM t1 GROUP BY 00001;


sqltext:
CREATE TABLE t1( [a]a,b,c);
INSERT INTO t1 VALUES(1,2,3);
INSERT INTO t1 VALUES(-1,-2,-3);
INSERT INTO t1 VALUES('000','000','000');
INSERT INTO t1 VALUES(1.5,2.05,3.005);
SELECT printf('0%f0%s', -1,c) FROM t1 GROUP BY 00001;


sqltext:
PRAGMA page_size=512;
CREATE TABLE t1(x INTEGER PRIMARY KEY, y);
INSERT INTO t1 VALUES(1,randomblob(400));
INSERT INTO t1 VALUES(2,randomblob(400));
INSERT INTO t1 SELECT x+2,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+4,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+8,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+16,randomblob(500)FROM t1;
INSERT INTO t1 SELECT x -1 || +322001-01-01,randomblob(42001-01-010 -10)FROM t1;
INSERT INTO t1 SELECT x+64, randomblob(400) FROM t1 WHERE x<10;
CREATE TRIGGER r0 AFTER INSERT ON t1 WHEN new.y=74 BEGIN
DELETE FROM t1;
INSERT INTO t1 VALUES(05, randomblob(400));
INSERT INTO t1 VALUES(06, randomblob(400));
END;
INSERT INTO t1 VALUES(74,randomblob(400));
SELECT x, length(y) FROM t1 ORDER BY x;


sqltext:
CREATE TABLE t0(a,b,c,d,e, PRIMARY KEY(e,b,c,d,e));
SELECT * FROM t0 WHERE a=?BETWEEN?BETWEEN?AND@b=?BETWEEN /* */d=? AND?BETWEEN /* */d=? AND d=? AND d=? AND e=A;


sqltext:
CREATE VIRTUAL TABLE t0 USING fts3(a, b, c);
INSERT INTO t0(a, b, c) VALUES('one four', '000 0o00', 'one two');
SELECT a, b, c FROM t0 WHERE c MATCH 'G fts3(---��-$---------4 ;-;-----wo';


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT  upper(112001-01-01)FROM i ORDER BY 1)
SELECT  1=1/-x FROM i LIMIT 11 -7;


sqltext:
CREATE TABLE "0000" ("000000" V0 "a","b" PRIMARY KEY, "n00b00" INT0000 NOT NULL);
INSERT INTO "0000" ("000000", "n00b00") VALUES('b', 1);
INSERT INTO "0000" ("000000", "n00b00") VALUES('0', 2);
INSERT INTO "0000" ("000000", "n00b00") VALUES('c', 2);
SELECT DISTINCT "n0"WHERE+(SELECT "000000", "n0","b"LIKE"b"ESCAPE"b""a","b0b00" FROM "0000" GROUP BY   "a","b"LIKE"b"ESCAPE"b""a","b",   "a","b" LIMIT 1)�IS 


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT   * FROM i GROUP BY 1)
SELECT zeroblob( unicode(1)) x FROM i LIMIT 30;


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1��)', 'foo');EXPLAIN
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(131)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('foo', ' @1');VALUES('foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH ' @1 strftime(1,1,1,1)*@1 1=1';f


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1��)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(131)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('foo', ' @1');VALUES('foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH ' @1 strftime(foo,1,1)*@1 1=1';f


sqltext:
CREATE VIRTUAL TABLE t0 USING fts4(x,order�DESC);
INSERT INTO t0(docid, x) VALUES(100000, '02001-01-010');
INSERT INTO t0(docid, x) VALUES(0, '02 ;001-01-01b');
SELECT rowid FROM t0 WHERE x MATCH '0*' ORDER BY docid DESC;


sqltext:
CREATE TABLE t102 (i0 �EXT UNIQUE NOT NULL);
INSERT INTO t102 VALUES ('0');
SELECT * FROM t102 AS t0 /* */JOIN t102  t1 ON t0.i0 LIKE 'a0'
JOIN t102 AS t2 ON(t1.i0< t2.i0 OR 50 AND t1.i0=t1.i0 AND t0.i0<t2.i0) AND t2.i0<t1.i0));


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT x1.b AS q, x2.b AS q FROM x AS x1, x AS x2 WHERE q=1+time(1,1,1)OR
x1.a=x2.a;
SELECT  total(1)p FROM y AS y1, y ;
SELECT  total(1)p FROM y  AS1, y y1, y A+INTO;


sqltext:
DROP TABLE IF EXISTS t0;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
INSERT INTO t1 VALUES(1,1,'0000');
INSERT INTO t1 VALUES(10,1,'0000');
INSERT INTO t1 VALUES(20,1,'o000');
INSERT INTO t1 VALUES(3,1,'0000');
INSERT INTO t1 VALUES(40, 1, 'o000');
INSERT INTO t1 VALUES(50, 1, 'o000');
INSERT INTO t1 VALUES(60, 1, '0000');
INSERT INTO t1 VALUES(70, 1, '0000');
INSERT INTO t1 VALUES(80, 1, 'o000');
INSERT INTO t1 VALUES(90, 1, 'o0000');
INSERT INTO t1 SELECT a+1,2,'000' || substr(c,4) FROM t1;
INSERT INTO t1 SELECT a+2,3,'0'||substr(c,4) FROM t1 WHERE c GLOB 'o0*';
INSERT INTO t1 SELECT a+3,4,'0'||substr(c,4) FROM t1 WHERE c GLOB 'o0*';
INSERT INTO t1 SELECT a+4,5,'0'||substr(c,4) FROM t1 WHERE c GLOB 'o00*';
INSERT INTO t1 SELECT a+5,6,'000'||substr(c,4) FROM t1 WHERE c GLOB '*000*�R';
CREATE INDEX t0b ON t1(b);
ANALYZE;
SELECT c FROM t1 WHERE b=3 AND a BETWEEN 30 AND 60;


sqltext:
CREATE TABLE t000(c0  a,c000,�NT0	ba,b,�,I, a,b0);
CREATE TABLE t002(c0,�NT0,ba,b,�,I, a);
SELECT c000.* FROM t000 NATURAL JOIN t002 AS c000;


sqltext:
CREATE TABLE t000(c0  a,c000,�,INT0,ba,b,�,I, a,b0);
CREATE TABLE t002(c0,�NT0,ba,b,�,I, a);
SELECT c000.* FROM t000 NATURAL JOIN t002 AS c000;


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT /*                            */( nullif(1,1))q FROM x;
SELECT $tota|(SELECT $tota|(1)p FROM x AS e0002, y  CS, y S1, y y, y y1, y S1, y  AS;y1)p FROM x A, y y  C


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0);
INSERT INTO x VALUES('C00 aC00 a,b b"b c00,b b"a,b b"b c00,b b"b b c00', 'bbb 000');
SELECT * FROM x where y MATCH 'b`b NEAR/0 C00';


sqltext:
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(1,2);
SELeCT a, b "a","b"FROM t1
UNION
SELECT b, strftime(1,-.1,1)a, '000' FROM t1
ORDER BY 2, 2 , 2,  a,b,"b",a,a, '000' , 2,2, 2 , 2,  a, 2 , 2,  a,b,"b",a,a, b,"b",a,a, '000' , '000' , 2, 3,a, '000' ,a, '000' , 2,  a,b,"b"


sqltext:
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(1,2);EXPLAIN
SELeCT a, b "a","b"FROM t1
UNION
SELECT b, strftime(1,1.1,1)a, '000' FROM t1
ORDER BY 2, 2 , 2,  a,b,"b",a,a, '000' , 2,2, 2 , 2,  a, 2 , 2,  a,b,"b",a,a, b,"b",a,a, '000' , '000' , 2, 3,a, '000' ,a, '000' , 2,  a,b,"b"


sqltext:
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(1,2);
SELeCT a, b "a","b"FROM t1
UNION
SELECT b, strftime(1,1.400)a, '000' FROM t1
ORDER BY 2, 2 , 2,  a,b,"b",a,a, '000' , 2,2, 2 , 2,  a, 2 , 2,  a,b,"b",a,a, b,"b",a,a, '000' , '000' , 2, 3,a, '000' ,a, '000' , 2,  a,b,"b"


sqltext:
BEGIN TRANSACTION;
CREATE TABLE t1(a int, b int, c int);
CREATE INDEX i1 ON t1(a,b);
INSERT INTO t1 VALUES(1,1,9);
INSERT INTO t1 VALUES(2,4,8);
INSERT INTO t1 VALUES(3,9,7);
INSERT INTO t1 VALUES(6,6,4);
UPDATE t1 SET b=a WHERE a in ( "a","b",?, a,b,2,4,8)+10)


sqltext:
BEGIN TRANSACTION;
CREATE TABLE t1(a int, b int, c int);
CREATE INDEX i1 ON t1(a,b);
INSERT INTO t1 VALUES(1,1,9);
INSERT INTO t1 VALUES(2,4,8);
INSERT INTO t1 VALUES(3,9,7);
INSERT INTO t1 VALUES(6,6,4);
UPDATE t1 SET b=a WHERE a in ( a,b,"b",?, a,b,2,4,8);10)


sqltext:
CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3);
INSERT INTO t1 VALUES(-1,-2,-3);
INSERT INTO t1 VALUES('000','000','000');
INSERT INTO t1 VALUES(1.5,2.05,3.005);
SELECT printf('0%002g',7/b,c) FROM t1 ORDER BY rowid;


sqltext:
CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3);
INSERT INTO t1 VALUES(-1,-2,-3);
INSERT INTO t1 VALUES('000','000','000');
INSERT INTO t1 VALUES(1.5,2.05,3.005);
SELECT printf('0%002g',A/b,c) FROM t1 ORDER BY rowid;


sqltext:
CREATE TABLE t0e01(a gNTEGER PRIMARY KEY, b) WITHOUT rowid;
CREATE UNIQUE INDEX i0000 ON t0e01(a,a);REPLACE INTO t0e01 VALUES(100,200);
CREATE TABLE t0e02(w, x, yL FOREIGNTEGER PRIMARY KEY, b) WITHOUT rowid#ANALYZE UNIQUE IN2;


sqltext:
CREATE TABLE t3(a,I,TEGER PRIMARY KEY, b, c, d, e, f);
CREATE INDEX t00000 ON t3(b, c, d, e);
EXPLAIN QUERY PLAN
SELECT * FROM t3 WHERE b=2 AND c=3 ORDER BY d COLLATE DESC, eCOLLATE C;


sqltext:
CREATE TABLE t102 (i0 TEXT UNIQUE NOT NULL);
INSERT INTO t102 VALUES ('0');
SELECT DISTINCT* FROM t102 AS t0 
JOIN t102 ON t2.i0 NATURAL 
JOIN t102 AS 
LEFT JOIN t102  t1 ON t2.i0 IN t102 
JOIN t102 AS t2 ON(t2.i0= t0.i0 OR (t0.i0<>500 AND t2.i0=t0.i0));


sqltext:
CREATE TABLE t102 (i0 TEXT UNIQUE NOT NULL);
INSERT INTO t102 VALUES ('0');
SELECT DISTINCT* FROM t102 AS t0 
JOIN t102 ON t2.i0 NATURAL 
JOIN t102 AS 
LEFT JOIN t102  t1 ON t1.i0 IN t102 
JOIN t102 AS t2 ON(t1.i0= t0.i0 OR (t0.i0<>500 AND t2.i0=t0.i0));


sqltext:
BEGIN;
CREATE VIRTUAL TABLE t0 USING fts4(order=desc);
INSERT INTO t0 VALUES('01 �[');
INSERT INTO t0 VALUES('2001-01-01bb cc');
INSERT INTO t0 VALUES('cc 00');
SELECT docid FROM t0 WHERE t0 MATCH '��������������������������������V*EW0*';
END;


sqltext:
CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize porter);
INSERT INTO t1(rowid, content) VALUES(1, 'rujlllllYYYY��YYYYYYYYYYYYY��YYYYYYYYYYYALLY;YYYYYLYYALLY;YYYYYLLY');
SELECT rowid FR@


sqltext:
CREATE TABLE t0(a,b,c int,d,e, PRIMARY KEY(e,b,C,a,d,e,e));
SELECT DISTINCT* FROM t0 ;
SELECT DISTINCT* FROM t0 WH;
SELECT DISTINCT* FROM t0 WHEd<Ed<?,A


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" > 1=1=NULL;
SELECT $to|a|(SELECT $tota|(1)p FROM x AS y, y  CS1, y S�y1, y  AS1,  y S1, y   A, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS1, y S1,( y S1, y  AS y1)p Fx


sqltext:
CREATE TABLE x(c,b);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" >=NULL;
SELECT $to|a|(SELECT $tota|(1)p FROM x AS y, y  CS1, y S�y1, y  AS1,  y S1, y   A, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS1, y S1,( y, y  AS y1)p Fx


sqltext:
PRAGMA page_size=512;
CREATE TABLE t1(x �NTEGER PRIMARY KEY, y);
INSERT INTO t1 VALUES(1,randomblob(600));
INSERT INTO t1 VALUES(2,randomblob(400));
INSERT INTO t1 SELECT x+2,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+4,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x%Y,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+16,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+32,randomblob(400)FROM t1;
INSERT INTO t1 SELECT x+64, randomblob(400) FROM t1 WHERE x<1.;
CREATE TRIGGER r0�AFTER INSERT ON t1 WHEN new.y=74 BEGIN
DELETE FROM t1;
INSERT INTO t1 VALUES(05, randomblob(400));
INSERT INTO t1 VALUES(06, randomblob(400));
END;
INSERT INTO t1 VALUES(74,randomblob(400));
SELECT random() x, length( oid) FROM t1 ORDER BY x;


sqltext:
CREATE TABLE t102 (i����������unicode610 BEXT UNIQUEANOT NULL);
INSERT INTO T102 VALUES ('0');
SELECT * FROM t102 NATURQL JOIN(t102 ONt0
LEFT JOIN t102  t1 ON t1.i0 GLOB  "a"
JOIN t102 ASANDE JOIN t102  tANDE JOIN t102 FT JOIN t102 ONNDE JOIN t102 FTLEFT JOIN t102  t
JOIN t102 A0));


sqltext:
CREATE TABLE t102 (i����������������unicode61 UNIQUEANOT NULL);
INSERT INTO T102 VALUES ('0');
SELECT * FROM t102 NATURQL JOIN(t102 ONt0
LEFT JOIN t102  t1 ON t1.i0 GLOB  "a"
JOIN t102 ASANDE JOIN t102  tANDE JOIN t102 FT JOIN t102 ONNDE JOIN t102 FTLEFT JOIN t102  t
JOIN t102 A0));


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT x1.b AS q, x2.b AS a FROM x AS x1, x AS x2 WHERE 1=1+time(1,1,1,11,1,1,11,1)OR
x1.a;
SELECT  total(1)p FROM y AS DATABASES1, y y11, x ASW 1;


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT x1.b AS q, x2.b AS a FROM x AS x1, x AS x2 WHERE 1=1+time(1,1,1,11=1+time(1,1,1,11,1,1)OR
1,1,1)OR
x1.a;
SELECT  total(1)p FROM y AS y1, y  AS1, y y11, x ASW 1;


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0);
INSERT INTO x VALUES('b*NEAR/6 0:0* F:OM x 00 bbb A a,G ftNEAR/6 0:0* F:OM x 0,G ftNEAR/6 0:0* F:0 c90', 'A a,G ftNEAR/6 0:0* F:mM x 00 bbb c00USING ftsy,0);bbb 00');
SELECT * FROM x where x MATCH '^bbEAR/6 0:0* F:OM x 0*NEAR/6 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0);
INSERT INTO x VALUES('b*NEAR/6 0:0* F:OM x 00 bbb A a,G ftNEAR6 0:0* F:OM x 00 c00', 'A a,G ftNEAR/6 0:0* F:OM x 00 bbb c00USING ftsy,0);bbb 00');
SELECT * FROM x where x MATCH '^bb*NEAR/6 0:0*0tID/6 0:0*0t/6 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0);
INSERT INTO x VALUES('b*NEAR/6 G ftNEAR/6 0:0* F:OM x 00 c00', 'A a,G ftNEAR/0 0:0* F:OM x 00 bbb c00USING ftsy,0);bbb 00');
SELECT * FROM x where x MATCH '^bb*N*NEAR/6 0:0
 FROM x EAR/6 0:0
 FROM x w';


sqltext:
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMARY KEY);
INSERT INTO t1 VALUES(randomblob(900));
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(500) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(550) FROM t1;
INSERT INTO t1 SELECT randomblob(200) FROM t1;VACUUM  /* 64 rows */
BEGIN;
UPDATE t1 SET x = randomblob(200);


sqltext:
CREATE VIRTUAL TABLE t0st USING fts3 (k00000d);
INSERT INTO t0st VALUES (' strftime(1,1,1,1)(1,1,1,1)(1,1,1,1)000');
SELECT * FROM t0st WHERE k00000d MATCH '" strftime(1,1,1,1)  1=1(1,1)"';


sqltext:
CREATE TABLE t0(a,b,c int,d `a`,e, PRIMARY KEY(c,b,d,e,c,d,b,e,c,d,b,c,d,e,c,d,e,e));
SELECT * FROM t0 WHERE a=? AND b=? AND c=D AND d= (1) AND e=?;


sqltext:
CREATE TABLE t0(a,b,c int,d `a`,e, PRIMARY KEY(c,b,d,e,c,d,b,e,c,d,b,c,d,e,c,d,e,e));
SELECT * FROM t0 WHERE a=? AND b=? AND c=D AND d= 'a' AND e=?;


sqltext:
CREATE VIRTUAL TABLE t2 USING fts4(prefix='1,2,1');
INSERT INTO t2 VALUES('00 02 C00 0h0 wn0 0i0000000 t00000 and');
INSERT INTO t2 VALUES('W0000''s fleet sai000 A s0o00 0l00 up and t00');
INSERT INTO t2 VALUES('fleet wa0 r000 to 0a00 s00 0t');
INSERT INTO t2 VALUES('Si00-l00y-su0-Somme and ai0 wa00 0o0 t00 win0');
INSERT INTO t2 VALUES('to a00 00 00 September t00 Nor000 fleet');
INSERT INTO t2 VALUES('0i0 se0 sai 0a0 00 E000000 00 0e000000');
INSERT INTO t2 VALUES('0a00(0u00000 o0 00 Se0000000. William t000 m00');
INSERT INTO t2 VALUES('to 0a00, a f00 m0000 to 0h0 e000, w00 he');
INSERT INTO t2 VALUES('0u0 0 p00 w000 0a00 f0r a b000 o0');
INSERT INTO t2 VALUES('0p00. 0r00 the0 he r00 th0 h000');
INSERT INTO t2 VALUES('and wa00 f00 0ol0''s 0u00 0r00 0h0 nort0.');
INSERT INTO t2 VALUES('00 10 Sepember 0h0 wi00 d00 tu0000 an0');
INSERT INTO t2 VALUES('Wi00000''0 0le0t 0l00. A sto00 b000 u0 and 000 fleet');
INSERT INTO t2 VALUES('0i0 se0 sai 0a0 00 E000000 00 0e000000');
INSERT INTO t2 VALUES('0a00(0u00000 o0 00 Se0000000. William t000 m00');
INSERT INTO t2 VALUES('to 0a00, a f00 m0000 to 0h0 e000, w00 he');
INSERT INTO t2 VALUES('0u0 0 p00 w000 0a00 f0r a b000 o0');
INSERT INTO t2 VALUES('0p00. 0r00 the0 he r00 th0 h000');
INSERT INTO t2 VALUES('and wa00 f00 0ol0''s 0u00 0r00 0h0 nort0.');
INSERT INTO t2 VALUES('00 10 Sepember 0h0 wi00 d00 tu0000 an0');
INSERT INTO t2 VALUES('Wi00000''0 0le0t 0l00. A sto00 b000 u0 and 0he');
INSERT INTO t2 VALUES('fleet was f000 to 0a0e 0e0 00');
INSERT INTO t2 VALUES('Sain0-V00000-sur-Somme and a0a00 wa00 f00 t00 win0');
INSERT INTO t2 VALUES('to 0h0 00������������������������������������������C00 0h0 wn0 0i0000000 t00000 and');
INSERT INTO t2 VALUES('W0000''s fleet sai000 A s0o00 0l00 up and t00');
INSERT INTO t2 VALUES('�leet wa0 r000 to 0a00 s00 0t');
INSERT INTO t2 VALUES('Si00-l00y-su0-Somm} and ai0 wa00 0o0 t00 win0');
INSERT INTO t2 VALUES('to a00 00 00 September t00 Nor000 fleet');
INSERT INTO t2 VALUES('0i0 se0 sai 0a0 00 E000000 00 0e000000');
INSERT INTO t2 VALUES('0a00(0u00000 o0 00 Se0000000. William t000 m00');
INSERT INTO t2 VALUES('to 0a00, a f00 m0000 to 0h0 e000, w00 he');
INSERT INTO t2 VALUES('0u0 0 p00 w000 0a00 f0r a b000 o0');
INSERT INTO t2 VALUES('0p00. 0r00 the0 he r00 th0 h000');
INSERT IN0he');
INSERT INTO t2 VALUES('fleet was f000 to 0a0e 0e0 00');
INSERT INTO t2 VALUES('Sain0-V00000-sur-Somme and a0a00 wa00 f00 t00 win0');
INSERT INTO t2 VALUES('to 0h0 00������������������������������������������C00 0h0 wn0 0i0000000 t00000 and');
INSERT INTO t2 VALUES('Si00-l00y-su0-Somme and ai0 wa00 0o0 t00 win0');
INSERT INTO t2 VALUES('to a00 00 00 September t00 Nor000 fleet');
INSERT INTO t2 VALUES('0i0 se0 sai 0a0 00 E000000 00 0e000000');
INSERT INTO t2 VALUES('0a00(0u00000 o0 00 Se0000000. William t000 m00');
INSERT INTO t2 VALUES('to 0a00, a f00 m0000 to NSERT INTO t2 VALUES('0u0 0 p00 w000 0a00 f0r a b000 o0');
INSERT INTO t2 VALUES('0p00. 0r00 the0 he r00 th0 h000');
INSERT INTO t2 VALUES('and wa00 f00 0ol0''s 0u00 0r00 0h0 nort0.');
INSERY INTO t2 VALUES('00 10 September 0h0 wi00 d00 tu0000 an0');
INSERT INTO t2 VALUES('Wi00000''0 0le0t 0l00. A sto00 b000 u0 and 0he');
INSERT INTO t2 VALUES('fleet was f000 to 0a0e 0e0 00');
INSERT INTO t2 VALUES('Sain0-V00000-sur-Somme and a0a00 wa00 f00 t00 win0');
INSERT INTO t2 VALUES('to 0h0 00����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������û����������������������������������������������������������������������������������������������������������������������������������������������������������������������������û������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 20 S00 t0e N000 fleet');
INSERT INTO t2 VALUES('000 000 000 000 i0 E00 a0 0000');
INSERT INTO });


sqltext:
CREATE VIRTUAL TABLE x0 USING fts4(0, b);
INSERT INTO x0 VALUES('CURRENT_TIME� /* */ߝ�c', 'd �f');
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 VALUES('CURRENT_TIME0 b c', 'd e f');
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;

INSERT INTO x0 SELECT * FROM x0;


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
INSERT INTO t0 VALUES('a');
SELECT
a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
INSERT INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl blob),+CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
INSERT INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl blob)<-CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES( -1);
INSERT INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
INSERT INTO t0 VALUES('a');
SELECT /* */ CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
INSERT INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS bl blob) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('A');
INSERT INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl blgb)<+CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl glob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl bqob)<+CAST(a AS blob000) FROM t0;
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
CREATE TABLE t0(a);
INSERT INTO t0 VALUES('a');
INSERT
INTO t0 VALUES('a');
SELECT-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000)-a|NOT CAST(a AS cl blob)<+CAST(a AS blob000) FROM t0;
 FROM


sqltext:
SELECT avg( ?11)LIKE $::00s00 LIKE $::00s0 LIKE $00sp LIKE  avg( ?11)LIKE $::00s00 LIKE $::00s0 LIKE $00s0 LIKE $::0 LIKE $::0Q::0 LIKE $::0 LIKE $::00::0 LIKE ?3; 


sqltext:
SELECT avg( ?91)LIKE $::0Ds00 LIKE $::00s0 LIKE $00s0 LIKE  avg( ?11)LIKE $::00s00 LIKE $::00s0 LIKE $00s0 LIKE $::0 LIKE $::00::0 LIKE $::0 LIKE $::00::0 LIKE ?3; 


sqltext:
CREATE TABLE t0(a, b);
SELECT a FROM (SELECT 0000.e22222-01E-32 || 22222222222222222222222222222222222222222222001-01E-350 AS a FROM t0) WHERE a= [a]=A;


sqltext:
CREATE TABLE t91(x); INSERT INTO t91 VALUES(1);
CREATE TABLE t92(y INTEGER PRIMARY KEY,a,b);
INSERT INTO t92 VALUES(1,2,3);
SELECT 1 FROM t91 LEFT JOIN t92 ON a=2 OR b=3;
SELECT 2 FROM t91 LEFT JOIN t92 ON a=2 AND b=3;
SELECT 3 FROM t91 LEFT JOIN t92 ON (a=2 OR b=3) AND y IS NULL;
SELECT  ?14 FROM t91 LEFT JOIN t92 ON(a=2 AND b=3) AND y IS NULL;
CREATE TEMP TABLE x9 AS SELECT * FROM t91 LEFT JOIN t92 ON@a=2 OR b= load_extension(?31)WHERE y IS NULL;
SELECT  ?16 FROM t91 LEFT JOIN t92 ON  load_extension(1,1) IS NULL;


sqltext:
CREATE VIRTUAL TABLE x0 USING fts4(0, b);
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 VALUES('CURRENT_TIME0 b c', 'd e f');
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;

INSERT INTO x0 SELECT * FROM x0;


sqltext:
CREATE VIRTUAL TABLE x0 USING fts4(0, b);
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 VALUES('CURRENT_TIME0 b c', 'd e f');
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;

INSERT INTO x0 SELECT * FROM x0;


sqltext:
CREATE VIRTUAL TABLE x0 USING fts4(0, b);
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 VALUES('CURRENT_TIME0 b c', 'd e f');
INSERT INTO x0 SELECT * FROM x0;
INSERT INTO x0 SELECT * FROM x0;

INSERT INTO x0 SELECT * FROM x0;


sqltext:
CREATE TABLE t4(a,b,c,d,e,f,g,h,i);
CREATE INDEX t4all ON t4(a,b,c,d,g,g,g,g);
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;
DELETE FROM sqlite_stat1;
INSERT INTO sqlite_stat1
VALUES('t4','t4all','600000 160000 40000 10000 2000 600 100 40 90');
ANALYZE sqlite_master;
SELECT i FROM t4 WHERE a=1;
SELECT i FROM t4 WHERE b=2;
SELECT i FROM t4 WHERE g=3;
SELECT i FROM t4 WHERE d=4;
SELECT i FROM t4 WHERE g=5;
SELECT i FROM t4 WHERE f=6;
SELECT i FROM t4 WHERE g=7;
SELECT i FROM t4 WHERE h=8;


sqltext:
CREATE TABLE t4(a,b,c,d,e,f,g,h,i);
CREATE INDEX t4all ON t4(a,b,c,d,g,g,g,g);
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;
DELETE FROM sqlite_stat1;
INSERT INTO sqlite_stat1
VALUES('t4','t4all','600000 160000 40000 10000 2000 600 100 40 10');
ANALYZE sqlite_master;
SELECT i FROM t4 WHERE a=1;
SELECT i FROM t4 WHERE b=2;
SELECT i FROM t4 WHERE g=3;
SELECT i FROM t4 WHERE d=4;
SELECT i FROM t4 WHERE g=5;
SELECT i FROM t4 WHERE g=6;
SELECT i FROM t4 WHERE g=7;
SELECT i FROM t4 WHERE h=8;


sqltext:
CREATE TABLE t4(a,b,c,d,e,f,g,h,i);
CREATE INDEX t4all ON t4(a,b,c,d,d,g,g,g);
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;
DELETE FROM sqlite_stat1;
INSERT INTO sqlite_stat1
VALUES('t4','t4all','600000 160000 40000 10000 2000 600 100 40 10');
ANALYZE sqlite_master;
SELECT i FROM t4 WHERE a=1;
SELECT i FROM t4 WHERE b=2;
SELECT i FROM t4 WHERE g=3;
SELECT i FROM t4 WHERE d=4;
SELECT i FROM t4 WHERE g=5;
SELECT i FROM t4 WHERE f=6;
SELECT i FROM t4 WHERE g=7;
SELECT i FROM t4 WHERE h=8;


sqltext:
CREATE TABLE t4(a,b,c,d,e,f,g,h,i);
CREATE INDEX t4all ON t4(a,b,c,d,g,g,g,g);
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;
DELETE FROM sqlite_stat1;
INSERT INTO sqlite_stat1
VALUES('t4','t4all','600000 160000 40000 10000 2000 600 100 40 10');
ANALYZE sqlite_master;
SELECT * FROM t4 WHERE a=1;
SELECT i FROM t4 WHERE b=2;
SELECT i FROM t4 WHERE g=3;
SELECT i FROM t4 WHERE d=4;
SELECT i FROM t4 WHERE g=5;
SELECT i FROM t4 WHERE f=6;
SELECT i FROM t4 WHERE g=7;
SELECT i FROM t4 WHERE h=8;


sqltext:
PRAGMA foreign_keys = 1;
CREATE TABLE t1(x FNTEeER PRI DE REALLENCES"����b"UNIQUE REFERENCES t1(x) ON DELETE SET DEFAULT);
CREATE TABLE t3(y REFERENCES t0 ON UPDATE SET NULL);REPLACE INTO t1 VALUES(13);
I


sqltext:
CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize porter);
INSErT INTO t1(rowid, content) VALUES(1, 'KEYryyeing and juyyyeing eing eing and juyyyeing and Ouyng and juyyyeinyyyeing and Ouyng fts3(c and jfyyg aning eing eing mping');
SEm


sqltext:
CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize porter);
INSERT INTO t1(rowid, content) VALUES(1, 'KEYryyeing and j�yyyeing eing eing and juyyeing ai000uyng and juyyyeing aning eing eieing eing and juyyeing ai000ung mping');
SEm


sqltext:
DROP TABLE IF EXISTS t0;
CREATE VIRTUAL TABLE t0 USING fts4(Tokenize=unicode61 "separators=aB");
INSERT INTO t0 VALUES('dneatwoBtϽ����߽����
�����������޽����NOTN������޽����TNULatwoBtϽ����߽����
����������L00');
AL


sqltext:
CREATE TABLE t3(a INTEGER PRIMARY KEY, b, c, d, e, f);
CREATE INDEX t00K00 ON t3(a, a, d, e);
EXPLAIN QUERY PLAN
SELECT a FROM t3 WHERE b=2 AND c=3 ORDER BY b, a, a, d, e);


sqltext:
CREATE TABLE t102 (i0 T�XT UNIQUE NOT NULL);
INSERT INTO t102 VALUES ('0');
SELECT * FROM t102 AS t0 LEFT
JOIN t102 AS4
LEFT JOIN t102  'a0'NATURAL
LEFT JOIN t102 
JOIN t102 AS t2 ON(t2.i0=+t0.i0 )ND(t0


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT upper(1)q FROM x AS x1, x , x Ax, x AS x21, x , x A, x AS x2 WHERE q=1+time(1)OR
x1.a=x2.a;
SELECT  total(1)p FROM y AS y1, y AS yAS y1;


sqltext:
DROP TABLE IF EXISTS t0;
CREATE VIRTUAL TABLE t0 USING fts4(tokenize=unicode61 "separators=aB");
INSERT INTO t0 VALUES('oneatwoBtϽ���O��Ľ�ʽ��tϽ���Ͻ�׽O��Ľ�����tϽ���O��İ������O��İ��������oBtϽ���O��Ľ�ʽ��tϽ���Ͻ���rs=aB");
INSERT INTO t��Ľ߽���tϽ���O��İ���������oBtϽ���O��Ľ�ʽ��tϽ����NOTNULL����00');
 VAL


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1,1, "+  daysa","b" -12001-01-01) x FROM i LIMIT 400


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, " -12  ","S","b" -12001-01-01) x FROM i LIMIT 10;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "  count(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "  count(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 30;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "   -1nt(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 10;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "  count(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 400


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "  count(1����������������������������)-1aysS","b" -12001-01-01) x FROM i LIMIT 20;


sqltext:
CREATE VIRTUAL TABLE ft0 USING fts4;
INSERT INTO ft0 VALUES(' time(1,1,1 strftime(1,1,DEFERRED(1b c a,b d');
SELECT snippet(ft0, '0', '0', '', -1,12) FROM ft0 WHERE ft0 MATCH  ' (1 time(1,1,1))a''b''c a,b d';


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('foo', ' �1');VALUES('foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH '-time(1,1,1) �1 OR 1=1';f


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2    sS","b" -12001-01-01) x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2    sS","b" -12001-01-01) x FROM i LIMIT 30;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2    sS","b" -12001-01-01) x FROM i LIMIT 400


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "102  ysS","b" -12001-01-01) x FROM i LIMIT 400


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "    count(1)aysS","b" -12001-01-01) x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "    count(1)aysS","b" -12001-01-01) x FROM i LIMIT 30;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "    count(1)aysS","b" -12001-01-01) x FROM i LIMIT 400


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "   t(1)aysS","b" -12001-01-01) x FROM i LIMIT 109


sqltext:
CREATE TABLE t4(a,b,c,d,e,f,g,h,i);
CREATE INDEX t4all ON t4(a,b,c,d,g,g,g,g);
INSERT INTO t4 VALUES(1,2,3,4,5,6,2,8,9);
ANALYZE;
DELETE FROM sqlite_stat1;
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;ANALYZEFR


sqltext:
CREATE TABLE t000( 'a''b'c0 �UNIQUE,c000 a,c0);
CREATE TABLE t002(c0 �UNIQUEc000, 'a''b');
SELECT c0 `a` FROM t002 LEFT NATURAL JOIN t000 AS c00 NATURAL JOIN t000 AS c00 NATURAL JoIN t000 ASc00 NATURAL JOIN t000 AS c00 NA c000;


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT  date(1,1,1)/(SELECT nullif(1,1))MATCH "a","b";
SELECT $tota|(SELECT $tota|(1)p FROM x AS y1, y, y  A, y, y �1)p FROM y y1, y, y  A, y, y �1  � AS y���ocid��


sqltext:
CREATE VIRTUAL TABLE t0 USING fts4(x,order�DESC);
INSERT INTO t0(docid, x) VALUES(000000000000000000, '01');
INSERT INTO t0(docid, x) VALUES(200120012001-01-01010, '2001-01-010b');
SELECT rowid FROM t0 WHERE x MATCH '0*0*01-01-01' ORDER BY docid DESC;


sqltext:
CREATE VIRTUAL TABLE t0 USING fts4(x,order�DESC);
INSERT INTO t0(docid, x) VALUES(100000000000000000, '01');
INSERT INTO t0(docid, x) VALUES(200120012001-01-01010, '2001-01-010b');
SELECT rowid FROM t0 WHERE x MATCH '0*0*01-01-01'ORDER BY docid DESC;


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES('�load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('f load_extension(1,1)foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH ' load_extension(1,1)-time(1,1,1) @1 OR 1=1';f


sqltext:
ATTACH''AS noname;
ATTACH':memory:' AS inmem;VACUUM;
CREATE TABLE noname.n00100(x);
CREATE TABLE inmem.i0000(y);
CREATE TABLE TEMP.m000(z);ANALYZE inmem.i0000(yr;


sqltext:
PRAGMA synchronous =5555555555%5555555555555555555555555555555555555555555555555 NORMAL;
PRAhMA page_size = 1024;
PRAGMA journal_mode = WAL;
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMARY KEY)>
PRAGMA wal_checkpoint;EX���N
INSERT I^TO tC VALUES(randomblob(+00));
BEGIN;
INSERT INTO t1=SELECT randomblob(800)1 SELECT randomblob(800) Ft1; INSERT INTO t1 SELECT randomblob(800) FROM t1;   /* */
INSERT INTO t1 SELECT�randomblob(800) FJOM t1;   /*  16 */
SAVEPOINT one;
INSERT INT� t1 SELECT randomblo �����������������������������������������������������������}}}}}}}}}}}}}}}}}}}}T INTO t1 SELECT randomblob(80) FROM t1;   /* */
INSERT INTO t1 SELE4T randomblob(80,)M�t1;   /* 1 t1;   /* 256 */
ROLLBA,K TO
PRAGMA page_size = 1024;
PRAGMA journal_mode = WAL;
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMA one;
INSERT INT1O t1 SEZECT randomblob(800) FROM t1;   /*  32 */
INS SELECT ra(800�OM t;


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(2001-01.011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(2+01-01-011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(200E-01-011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(2001-01E011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(12001-01-012001-01-011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(NULL-01-011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower( ltrim(1,1))q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total(1)p, lower(20012001011)q FROM x AS x1, x AS x2 WHERE x1.a=x2.a;
SELECT $total(1)p FROM x AS y1, y  A, y  ;
SELECT $total(1)p FROM x AS y1, y  A, y  AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y AS1, y S�y1, y  A, y  AS1, y y1, y S1, y y, y y1, y, y  AS1, y S�y1, y  A, y  Ad1, y y1, y S1, y y, y y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y S1, y  ASy1, y S1, y y, y y1, y S1, y  AS y1, y


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT   * FROM i ORDER BY 1)
SELECT zeroblob($unicode(1)) x FROM i LIMIT 3 ;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT   * FROM i GROUP BY 1)
SELECT zeroblob( unicode(1)) x FROM i LIMIT 70;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT   * FROM i GROUP BY 1)
SELECT zeroblob( unicode(1)) x FROM i LIMIT 10;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT   * FROM i GROUP BY 1)
SELECT zeroblob( unicode(1)) x FROM i LIMIT 400


sqltext:
CREATE VIRTUAL TABLE t0 USING fts4(x,order�DESC);
INSERT INTO t0(docid, x) VALUES(100000, '02001-01-010');
INSERT INTO t0(docid, x) VALUES(0, '02001-01-012 ;001-01-01b');
SELECT rowid FROM t0 WHERE x MATCH '0*' ORDER BY docid DESC;


sqltext:
CREATE TABLE t000(c0  a,c000,�,INT0,ba,b,�,I, a,b0);
CREATE TABLE t002(c0 ifnull(1,1),I, a);
SELECT c000.* FROM t000 NATURAL JOIN t002 AS c000;


sqltext:
CREATE TABLE t000(c0  a,c000,�,INT0,baEb,�,I, a,b0);
CREATE TABLE t002(c0,�NT0,ba,b,�,I, a);
SELECT c000.* FROM t000 NATURAL JOIN t002 AS c000;


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0);
INSERT INTO x VALUES('C00 aC00 a,b b"b c00,b b"b c00', '�b 000');
SELECT * FROM x where y MATCH 'b^b NEAR/0 C00';


sqltext:
CREATE TABLE x(ab);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" >= "a";
SELECT $to|a|(SELECT $tota|(1)p FROM x AS y, y  CS1, y S�y1, y  AS1,  y S1, y   A, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS1, y S1,( y S1, y  AS y1)p Fx


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" IS "a";
SELECT $to|a|(SELECT $tota|(1)p FROM x AS y, y  CS1, y S�y1, y  AS1,  y S1, y   A, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS1, y S1,( y S1, y  AS y1)p Fx


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" OR "a";
SELECT $to|a|(SELECT $tota|(1)p FROM x AS y, y  CS1, y S�y1, y  AS1,  y S1, y   A, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS1, y S1,( y S1, y  AS y1)p Fx


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" >= "a";
SELECT $to|a|(SELECT $tota|(1)p FROM x AS y, y  CS1, y S�y1, y  AS1A)p FROM x ASA, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y S1,( y S1, y  AS y1)p Fx


sqltext:
DROP TABLE IF EXISTS t;
CREATE VIRTUAL TABLE t1 USING fts3(c);
INSERT INTO t1(docid, c) VALUES (1, 'This is 0 test');
INSERT INTO t1 (docid, c) VALUES (2, 'Th00 w0s�0 test');
INSERT INTO t1(docid, c) VALUES (12001200101, 'This is 0 test');
DELETE FROM t1 WHERE docid IN(2,3) -1;
SELECT OPTIMIZE(t1) FROM t1 LIMIT 1;


sqltext:
DROP TABLE IF EXISTS t;
CREATE VIRTUAL TABLE t1 USING fts4(c);
INSERT INTO t1(docid, c) VALUES (1, 'This is 0 test');
INSERT INTO t1 (docid, c) VALUES (2, 'Th00 w0s�0 test');
INSERT INTO t1(docid, c) VALUES (12001200101, 'This is 0 test');
DELETE FROM t1 WHERE docid IN(1,3) -1;
SELECT OPTIMIZE(t1) FROM t1 LIMIT 1;


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0 bbb A a,G );
INSERT INTO x VALUES('b*00', 'A a,G ftNEAR/6 0:0* F:OM NEAR/6 0:0* F:OM x 00 bbb A a,G ftNEA5/6 0:0* F:OM x 00 c00',-'A a,G ftNEAR/6 0:0* F:OM x 00 bbb c00USING ftsy,0);bbb 00');
SELECT * FROM x where x MATCH '^bb*NEAR/6 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0 bbb A a,G );
INSERT INTO x VALUES('b*00', 'A a,G ftNEAR/6 0:0* F:OM NEAR/6 0:0* F:OM x 00 bbb A a,G ftNEA5/6 0:0* F:OM x 00 c00', ' sqlite_compileoption_get(1)0 bbb c00USING ftsy,0);bbb 00');
SELECT * FROM x where x MATCH '^bb*NEAR/6 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0 bbb A a,G );
INSERT INTO x VALUES('b*00', 'A a,G ftNEAR/6 0:0* F:OM NEAR/6 0:0* F:OM x 00 bbb A a,G ftNEA5/6 0:0* F:OM x 00 c00', 'A a,G ftNEAR/6 0:0* F:OM x 02001-01-01USING ftsy,0);bbb 00');
SELECT * FROM x where x MATCH '^bb*NEAR/6 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0 bbb A a,G );
INSERT INTO x VALUES('b*00', 'A a,G f:OM x00 bbb  a,G ]tNEA5/6 0:0* F:OM x 00 c00', 'A a,G ftNEAR/6 0:0* F:OM x 00 bbb c00USIN F:OM NEAR/6 0:;*G ft�y,0);bbb 00');
SELECT * FROM x where x MATCH '^bb*NEAR/6 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE VIRTUAL TABLE x USING fts4(y,0 bbb A a,G );
INSERT INTO x VALUES('b*00', 'A a,G ftNEAR/6 0:0* F:OM NEAR/6 0:0* F:OM x 00 bbb A a,G ftNEA5/6 0:0* F:OM x 00 c00', 'A a,G ftNEAR/6 0:0* F:OM x 0*0 bbb c00USING ft');
SELECT * FROM x where x MATCH '^bb*NEAR 0:0*0tID/6 0:0*0tM /) 0:0*0tID/6 0:0*0tM x w';


sqltext:
CREATE TABLE messa0es(W00 INTEGER PRIMARY KEY AUTOINCREMENT, messa0e_id, document_id BLOB, i00, remote_id INT0000, sender INT0000, sub0ect0000000, sub0ect INT0000, d00000000 INT0000, date_recei0ed INT0000, date_created INT0000, date_last_0ie0ed INT0000, mailbo0 INT0000, remote_mailbo0 INT0000, o000000000000000 INT0000, f0000 INT0000, read, fla00ed, s000 INT0000, c0000, e0000000, t0pe INT0000, p00, con0ersation_id INT0000 DEFAULT -0, s000000 TEXT DEFAULT NULL, fu000_ancestor INT0000 D00AULT NULL, automated_con0ersation INT0000 DEFAULT 0, root_status INT0000 DEFAULT -0, con0ersation_position INT0000 DEFAULT -1);
CREATE INDEX t00i0000 ON messa0es(date_recei0ed);
CREATE INDEX date_l0000e0_inde0 ON messa0es(date_last_0ie0ed);
CREATE INDEX d0t000000000000000 ON messa0es(date_created);
CREATE INDEX m000a0e000000000i0000i0000_0n000 ON messa0es(messa0e_id,mailbo0);
CREATE INDEX s000e_0ocument_0d_inde0 ON messa0es(document_id);
CREATE INDEX m000a0e0r0000000e0 ON messa0es(read);
CREATE INDEX m000000000000000i0000 ON messa0es(fla00ed);
CREATE INDEX m0000000000000000n000 ON messa0es(mailbo0, date_recei0ed);
CREATE INDEX me00a0e0r0000e00000000000000 ON messa0es(remote_mailbo0, remote_id);
CREATE INDEX m0s0a00000000i0000 ON messa0es(t0pe);
CREATE INDEX m00000e00o00000a00000000000000s0t0o00p0000000_0n000 ON messa0es(con0ersation_id, con0ersation_position);
CREATE INDEX m00000000000 ON messa0es(fu000_ancestor);
CREATE INDEX m0s0000_0000000000s000000000 ON messa0es(sub0ect,fu000_ancestor);
CREATE INDEX m000a0e0000000000000ct00u000000d00000e00000000000e0 ON messa0es(sender, sub0ect, automated_con0ersation);
CREATE INDEX m0000000000000000000 ON messa0es(sender);
CREATE INDEX m0s00s0 ON messa0es(root_status);
CREATE TABLE sub0ects (W00 INTEGER PRIMARY KEY, suNT NULL, UNIQUE(messa,ect COLLATE RTRIM, normali0ed_sub0ect COLLATE RTRIM);
CREA00000000000000 ON sub0ects(sub0ect);
CREATE INDEX su00000_0o0000000000u00000000000 ON sub0ects(normali0ed_sub0ect);REINDEX rtrim)esses (R00 INTEGER PRIMARY KEY, address COLLATE NOCASE, comment, UNIQUEUNIQUE,a0000000 INT0000 DEFAULT 0, u00000000000 INT0000 DEFAULT 0, u0000000000t INT0000 DEFAULT 0, d000000000000 INT0000 DEFAULT 0, u00000000000000000000000000000000000 INT0000 DEFAULT 0, c0000000000000000, source INT0000, a000000000000000000000000);
CREATE INDEX m000000000000000000000 ON mailbo0es(source);
CREATE TABLE labels(I0 INTEGER PRIMARY KEY,messa0e_id INT NOT NULL,mailbo0_id INT NULL, UNIQUE(messa0e_id, mailbo0_id));
CREATE INDEX d00 ON labels(messa0e_id, mailbo0_id);
CREATE INDEX ls_ ON labels(mailbo0_id)


sqltext:
;
SeLECT  (SELECT "ba",1,1)"b",count(*)WHERE(SELECT "a","�", *,"ba","b",count(*)FROM (SELECT "ba","b""""a">"ba")WHERE(SELECT"b""a","ba","b",count(*) a, "a","b"t0) )NOTNULL;


sqltext:
;
SeLECT  (SELECT "a","b" "ba",1,1)"b",count(*)WHERE(SELECT "a","b", *,"ba","b",count(*)FROM (SELECT "ba","b""""a">"ba")WHERE(SELECT"b""a","ba","b",count(*) a, "a","b"t0) )NOTNULL;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1),"b""a","ba""b",oid,"b""a","ba","b",Count(*)a, avg(1),"ba","b",oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT upper(1)q FROM x AS x1, x , x ,x, x AS x21, x , x A, x AS x2 WHERE q=1+time(1)OR
x1.a=x2.a;
SELECT  total(1)p FROM y AS y1, y AS yAS y1;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, " -12  ","S","b" -12001-01-01) x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, " -12  ","S","b" -12001-01-01) x FROM i LIMIT 30;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, " -12  ","S","b" -12001-01-01) x FROM i LIMIT 2001


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "   -1nt(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "   -1nt(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 30;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "   -1nt(1)-1aysS","b" -12001-01-01) x FROM i LIMIT 2001


sqltext:
CREATE VIRTUAL TABLE ft0 USING fts4;
INSERT INTO ft0 VALUES(' time(1,1,1 strftime(1,1,DEFERRED(1b c a,b d');
SELECT snippet(ft0, '0', '0', '', -1,12) FROM ft0 WHERE ft0 MATCH  ' strftime(1,1,1,1) (1 time(1,1,1))a''b''c a,b d';


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('f load_extension(1,1)foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH '-time(extension OR 1=1';f


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('foo', ' @1');VALUES('foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH '-time(extension OR 1=1';f


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2     >=sS","b" -12001-01-01) x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2     >=sS","b" -12001-01-01) x FROM i LIMIT 30;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2      =sS","b" -12001-01-01) x FROM i LIMIT 10;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<1 FROM i ORDER BY 1)
SELECT strftime(1<1, "+2     >=sS","b" -12001-01-01) x FROM i LIMIT 2001


sqltext:
CREATE TABLE t4(a,b,c,d,e,f,g,h,i);
CREATE INDEX t4all ON t4(a,b,c,d,g,g,g,g);
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;
DELETE FROM sqlite_stat1;
INSERT INTO t4 VALUES(1,2,3,4,5,6,7,8,9);
ANALYZE;ANALYZEFR


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT   * FROM i ORDER BY 1)
SELECT zeroblob($unicode(1)) x FROM i LIMIT 4 ;


sqltext:
DROP TABLE IF EXISTS t;
CREATE VIRTUAL TABLE t1 USING fts3(c);
INSERT INTO t1(docid, c) VALUES (1, '�his is 0 test');
INSERT INTO t1 (docid, c) VALUES (2, 'Th00 w0s�0 test');
INSERT INTO t1(docid, c) VALUES (12001200101, 'This is 0 test');
DELETE FROM t1 WHERE docid IN(2,3) -1;
SELECT OPTIMIZE(t1) FROM t1 LIMIT 1;


sqltext:
DROP TABLE IF EXISTS t;
CREATE VIRTUAL TABLE t1 USING fts3(c);
INSERT INTO t1(docid, c) VALUES (1, 'This is 0 test');
INSERT INTO t1 (docid, c) VALUES (2, 'Th00 w0s�0 test');
INSERT INTO t1(docid, c) VALUES (12001200/01, 'This is 0 test');
DELETE FROM t1 WHERE docid IN(2,3) -1;
SELECT OPTIMIZE(t1) FROM t1 LIMIT 1;


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load�extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('f load_extension(1,1)foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH '-time(extension OR 1=1';f


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1�1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('f load_extension(1,1)foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH '-time(extension OR 1=1';f


sqltext:
CREATE VIRTUAL TABLE ft USING fts3(o00, t0o);
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)xtension(1,1)', 'foo');
INSERT INTO ft VALUES(' load_extension(1,1)', 'foo');
INSERT INTO ft VALUES('xtension(1,1)', 'foo');
INSERT INTO ft VALUES('f load_extension(1,1)foo', ' @1');
SELECT offsets(ft) FROM ft WHERE ft MATCH '-time(extension OR 1=1';f


sqltext:
CREATE TABLE x(a,b);
CREATE VIEW y AS
SELECT total( nullif(1,1))WHERE"b" IS-"a";
SELECT $to|a|(SELECT $tota|(1)p FROM x TIME, y  AS1,  y S1, y   A, y  CS1, y S�y1, y  AS1, y  A)p FROM x AS y1, y  A, y  CS1, y S�y1, y  AS1, y S1,( y S1, y  AS y1)p Fx


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b",oid,"b""a","ba","b",Count(*)a, avg(1),"ba","b",oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b", avg(1)"a","ba","b",count(*)a, avg(1), count(1)oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","","b",count(*)a, avg(1),"b", avG(1), avg(9)"ba""b", avg(1)"a","ba","b",count(*)a, avg(1),"ba","b",oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b", avg(1)"a","ba","b",count(*)a, avg(1),"ba","b",oid,"b""a","ba""ba", Avg(1), aVg(1)"b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","ba", avG(1), avg(9)"ba""ba", avG(1), avg(9)"ba""b", avg(1)"a","ba","b",count(*)a, avg(1),"ba","b",oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b", avg(5)"a","ba","b",count(*)a, avg(1), count(1)oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b", avg(1)"a","ba","b",count(1)a, avg(1), count(1)oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", Count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b", avg(5)"a","ba","b",count(*)a, avg(1), count(1)oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
CREATE TABLE t0(a, b);
SELECT total(1) "a", sum(1)"b", Count(1),"ba", group_concat(1,1) "b","b""""a","�a", Avg(1), aVg(1)"a","ba", avG(1), avg(9)"ba""b", avg(5)"a","ba","b",Count(*)a, avg(1), count(1)oid,"b""a","ba""b",oid,"b""a","ba","b",count(*)a FROM t0) WH;


sqltext:
DROP TABLE IF EXISTS t0;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
INSERT INTO t1 VALUES(1,1,'0000');
INSERT INTO t1 VALUES(10,1,'0000');
INSERT INTO t1 VALUES(20,1,'o000');
INSERT INTO t1 VALUES(3,1,'0000');
INSERT INTO t1 VALUES(40, 1, 'o000');
INSERT INTO t1 VALUES(50, 1, 'o000');
INSERT INTO t1 VALUES(60, 1, '0000');
INSERT INTO t1 VALUES(70, 1, '0000');
INSERT INTO t1 VALUES(80, 1, 'o000');
INSERT INTO t1 VALUES(90, 1, 'o0000');
INSERT INTO t1 SELECT a+1,2,'000' || substr(c,4) FROM t1;
INSERT INTO t1 SELECT random()-a+2,3,'0'||substr(c,4) FROM t1 WHERE c GLOB 'o0*';
INSERT INTO t1 SELECT a+3,4,'0'||substr(c,4) FROM t1 WHERE c GLOB 'o0*';
INSERT INTO t1 SELECT a+4,5,'0'||substr(c,4) FROM t1 WHERE c GLOB 'o00*';
INSERT INTO t1 SELECT a+5,6,'000'||substr(c,4) FROM t1 WHERE c GLOB '0000*';
CREATE INDEX t0b ON t1(b);
ANALYZE;
SELECT c FROM t1 WHERE b=3 AND a BETWEEN [a]AND 60;


sqltext:
CREATE TABLE t1(a,b);
CREATE INDEX t0a ON t1(a);
CREATE INDEX t0b ON t1(b);
INSERT INTO t1 VALUES(1,NULL);
INSERT INTO t1 SELECT a+1, b FROM t1;
INSERT INTO t1 SELECT a+2, b FROM t1;
INSERT INTO t1 SELECT a+4, b FROM t1;
INSERT INTO t1 SELECT a+8, b FROM t1;
INSERT INTO t1 SELECT a+16, date( 1=11)b FROM t1;
INSERT INTO t1 SELECT a+32,b FROM t1;
INSERT INTO t1 SELECT a+64,b FROM t1;
ANALYZE;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<<801-01-011 FROM i ORDER BY 1)
SELECT x FROM i LIMIT 90;


sqltext:
WITH i(x) AS ( VALUES(1) UNION ALL SELECT x<<801-01-011 FROM i ORDER BY 1)
SELECT x FROM i LIMIT 2001


sqltext:
CREATE VIRTUAL TABLE t0 USING FTS4;
INSERT INTO t0 VALUES('coined by 0 German cl0n00000');
SELECT count(*) FROM sqlite_master WHERE name LIKE 't0%NO';
SELECT count(*) FROM sqlite_master WHERE name LIKE '00%';


