## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
.expert
ATTACH DATABASE ':memory:' AS aux70;
CREATE TABLE "T" (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (-(-(1)),'a',3.14), (1,'b',-7.75), (2,'c',-9e999);
SELECT b,a,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
PRAGMA parser_trace = ON;
PRAGMA trusted_schema = YES;
PRAGMA vdbe_addoptrace = TRUE;
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSErt INTO t1 VALUES (iif(CAST((replace('aaa', 'a', 'bb') * printf('%x', CAST('🙂' AS DATETIME))) AS CLOB), ltrim('xxxhelloxxx', 'x'), 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (NOT NOT (NOT NOT (b)))) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (iif(CAST(0 AS CLOB), 9223372036854775807, 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (b)) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (iif(CAST(0 AS CLOB), 9223372036854775807, 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (b)) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL,
  d REAL
);
INSERT INTO T VALUES (1,'a',40.5,-70.0), (2,'b',-10.25,20.5), (3,'c',9e999,-9e999);
SELECT b FROM T WHERE ABS(c) > 5 AND ABS(d) > 5;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
CREATE TABLE T (
  a TEXT,
  b TEXT
);
INSERT INTO T VALUES ('a','2020-01-01'), ('b','2026-01-01');
SELECT a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (iif(CAST(0 AS CLOB), 9223372036854775807, 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (b)) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (iif(CAST(0 AS CLOB), 9223372036854775807, 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (b)) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (iif(CAST(0 AS CLOB), 9223372036854775807, 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (b)) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
.explain off
BEGIN EXCLUSIVE TRANSACTION;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (iif(CAST(0 AS CLOB), 9223372036854775807, 0, 9223372036854775807, 9223372036854775807), 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);
CREATE INDEX t1bc ON t1(b, c);
PRAGMA writable_schema = ON;
.imposter t1bc t2

SELECT * FROM t2;
SELECT b, c FROM t1 ORDER BY b, c;
.quit
BEGIN;
.system echo "mwahaha i am root"
.backup main output.db
PRAGMA ignore_check_constraints = TRUE;
-- NTH_VALUE({c}, -1)

.exit json_valid(CAST(CAST('0' AS DOUB) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE [t1](a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE NOT NOT (NOT NOT (b)) ;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(-(-(x'c41d')) AS NCHAR(-(-(json_error_position(-(-(if(2147483646, 55, 0, 55, 0, 55, 55)))))))), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE +b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
PRAGMA ignore_check_constraints = TRUE;
.exit json_valid(CAST(CAST(9999 AS DATETIME) AS CHARINT))
PRAGMA read_uncommitted = OFF;
-- PRAGMA query_only = ON;
PRAGMA read_uncommitted = NO;
PRAGMA threads;
PRAGMA page_size;
.vfsname
CREATE TABLE t1(a, b TEXT);
CREATE UNIQUE INDEX IF NOT EXISTS x1 ON t1(b==glob('*', 'hello'));
CREATE INDEX
IF NOT EXISTS x2 ON t1(a || NULL) WHERE b;
INSERT INTO t1(a,b) VALUES('a',json_quote(json_remove(CAST(123 AS NCHAR(55)), '$'))),('a',0);
SELECT a, b, '|' FROM t1;
ALTER TABLE t1 ADD COLUMN extra_3799 VARCHAR(255);
PRAGMA reverse_unordered_selects = 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_9377 AFTER DELETE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM t1 AS a FULL OUTER JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT COUNT(b) FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN 2 PRECEDING OR 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
ALTER TABLE t1 ADD COLUMN extra_4068 TEXT NOT NULL DEFAULT 0;
SELECT STRING_AGG(b) FROM t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
PRAGMA foreign_keys = OFF;
CREATE TRIGGER IF NOT EXISTS trg_t1_2882 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO t1 DEFAULT VALUES;
VACUUM;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 DROP COLUMN b;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (NULL, NULL);
SELECT COUNT(*) FROM t1;
SELECT GROUP_CONCAT(a) FROM t1;
SELECT * FROM t1 AS a JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE t1;
SELECT TOTAL(b) FROM t1;
SELECT * FROM t1 AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t1 ADD COLUMN extra_7470 REAL UNIQUE;
INSERT INTO t1 SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT RANK() OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_t1_4926 AFTER UPDATE OF a ON t1 BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO t1 DEFAULT VALUES;
DELETE FROM t1 WHERE rowid = 72 RETURNING *;
CREATE TRIGGER IF NOT EXISTS trg_t1_5958 BEFORE DELETE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_6286 AS SELECT b FROM t1;
VACUUM;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_1170 ON t1(b) WHERE b > 0;
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FROM t1;
DELETE FROM t1 WHERE 1 RETURNING *;
END TRANSACTION;
INSERT INTO t1 VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE t1;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM t1 WHERE a > (SELECT COUNT(*) FROM t1);
SELECT * FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t1_9340 ON t1(a COLLATE NOCASE);
ANALYZE;
COMMIT;
ALTER TABLE t1 ADD COLUMN extra_4698 CHAR(10) NOT NULL DEFAULT 0;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9584 ON t1((a + 1)) WHERE a IS NOT NULL;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
CREATE  INDEX IF NOT EXISTS idx_T_3297 ON T(a) WHERE a > 0;
SELECT TOTAL(b) FROM T;
DELETE FROM T WHERE 0;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_3961 ON T(c);
SELECT * FROM T;
UPDATE t1 SET a = 'x' WHERE 1;
PRAGMA vdbe_listing = OFF;
SELECT LAG(a, 2) OVER (PARTITION BY a ORDER BY a RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_304 ON T((c + 1));
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
UPDATE t1 SET b = b + 1 WHERE rowid = 1;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(30),
  C VARCHAR(30),
  PRIMARY KEY (A, B),
  UNIQUE (A, C)
);
INSERT INTO T VALUES ('a', 'p', 'x');
INSERT INTO T VALUES ('a', 'q', 'y');
INSERT INTO T VALUES ('b', 'p', 'z');
INSERT INTO T VALUES ('c', 'r', 'w');
INSERT INTO T VALUES ('d', 's', 'v');
SELECT A, COUNT(DISTINCT B) AS D FROM T GROUP BY A HAVING COUNT(DISTINCT B) >= 1;
CREATE TRIGGER IF NOT EXISTS trg_T_3688 BEFORE DELETE ON T FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
WITH cte AS (SELECT COUNT(*) AS cnt FROM t1) SELECT * FROM cte WHERE cnt > 0;
WITH cte AS (SELECT 1.5 AS x) SELECT CAST(x AS TEXT) FROM cte;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO T VALUES ('x', 'x', 'x') ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
ALTER TABLE t1 RENAME TO t1_r7367;
INSERT INTO t1 VALUES (NULL, NULL);
ALTER TABLE t1 RENAME TO t1_r2257;
DROP TABLE IF EXISTS T;
INSERT INTO t1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ALTER TABLE T RENAME COLUMN A TO A_r7375;
DROP TABLE IF EXISTS T;
CREATE TRIGGER IF NOT EXISTS trg_T_27 BEFORE UPDATE OF B ON T FOR EACH ROW BEGIN INSERT INTO T(B) VALUES (NULL); END;
VACUUM;
DROP TABLE IF EXISTS t1;
CREATE TRIGGER IF NOT EXISTS trg_T_8411 BEFORE UPDATE OF C ON T FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT OR ABORT INTO t1 VALUES (NULL, 0);
INSERT INTO t1 DEFAULT VALUES;
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T;
DELETE FROM t1 WHERE a IS NULL;
SELECT AVG(B) FROM T;
INSERT INTO t1 VALUES (NULL, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_5600 ON T((C + 1)) WHERE C IS NOT NULL;
DELETE FROM t1 WHERE a > (SELECT AVG(a) FROM t1);
SELECT MAX(B) FILTER (WHERE B IS NOT NULL) OVER (ORDER BY B) FROM T;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',1.0), ('a','c',-1.0), ('b','d',0.0);
SELECT
COALESCE(a,'e') AS d,
COALESCE(b,'f') AS e,
SUM(c) AS f
FROM T
GROUP BY a,b;
SELECT LEAD(a) OVER (PARTITION BY a ORDER BY a ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM t1;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
DROP INDEX IF EXISTS T;
INSERT INTO T SELECT * FROM T;
DETACH DATABASE aux70;
WITH a AS NOT MATERIALIZED (SELECT * FROM t1), b AS MATERIALIZED (SELECT * FROM a) SELECT * FROM b;
DROP INDEX IF EXISTS t1;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM t1;
VACUUM;
CREATE TRIGGER IF NOT EXISTS trg_T_1561 AFTER UPDATE ON T BEGIN SELECT RAISE(ABORT, 'abort'); END;
SELECT COUNT(*) OVER (ORDER BY a RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t1;
INSERT INTO T SELECT * FROM T;
SELECT a FROM T WHERE a = (SELECT MAX(a) FROM T);
```

## Actual output

```sql
(no new indexes)

(null)
Memory Used:                         79016 (max 213288) bytes
Number of Outstanding Allocations:   163 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 16928) bytes
Largest Allocation:                  48000 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                32 (max 123)
Successful lookaside attempts:       317
Lookaside failures due to size:      2
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     6
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1064 bytes
Statement Heap/Lookaside Usage:      2512 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               30
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2512
Bytes received by read():            10665
Bytes sent to write():               25
Read() system calls:                 14
Write() system calls:                1
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         76528 (max 213288) bytes
Number of Outstanding Allocations:   152 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 16928) bytes
Largest Allocation:                  48000 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                45 (max 123)
Successful lookaside attempts:       362
Lookaside failures due to size:      2
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     2
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1088 bytes
Statement Heap/Lookaside Usage:      4880 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               37
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        4880
Bytes received by read():            10761
Bytes sent to write():               1323
Read() system calls:                 16
Write() system calls:                2
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
a|1|3.14|1
b|1|-7.75|2
c|2|-Inf|1
Memory Used:                         83520 (max 213288) bytes
Number of Outstanding Allocations:   154 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                71 (max 123)
Successful lookaside attempts:       475
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     2
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1088 bytes
Statement Heap/Lookaside Usage:      19664 bytes
Fullscan Steps:                      2
Sort Operations:                     1
Autoindex Inserts:                   0
Virtual Machine Steps:               201
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        19664
Bytes received by read():            10859
Bytes sent to write():               2623
Read() system calls:                 18
Write() system calls:                3
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         76528 (max 213288) bytes
Number of Outstanding Allocations:   152 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                35 (max 123)
Successful lookaside attempts:       480
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     0
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1088 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               3
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            10957
Bytes sent to write():               3960
Read() system calls:                 20
Write() system calls:                4
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         76528 (max 213288) bytes
Number of Outstanding Allocations:   152 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                35 (max 123)
Successful lookaside attempts:       485
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     0
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1088 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               4
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            11055
Bytes sent to write():               5259
Read() system calls:                 22
Write() system calls:                5
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         76528 (max 213288) bytes
Number of Outstanding Allocations:   152 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                35 (max 123)
Successful lookaside attempts:       490
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     0
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1088 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               3
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            11153
Bytes sent to write():               6558
Read() system calls:                 24
Write() system calls:                6
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         76528 (max 213288) bytes
Number of Outstanding Allocations:   152 (max 345)
Number of Pcache Overflow Bytes:     16928 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                35 (max 123)
Successful lookaside attempts:       493
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    13592 bytes
Page cache hits:                     1
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1088 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               4
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            11251
Bytes sent to write():               7857
Read() system calls:                 26
Write() system calls:                7
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         89456 (max 213288) bytes
Number of Outstanding Allocations:   180 (max 345)
Number of Pcache Overflow Bytes:     21288 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                32 (max 123)
Successful lookaside attempts:       568
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    17936 bytes
Page cache hits:                     3
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1432 bytes
Statement Heap/Lookaside Usage:      2480 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               28
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2480
Bytes received by read():            11349
Bytes sent to write():               9156
Read() system calls:                 28
Write() system calls:                8
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         87000 (max 213288) bytes
Number of Outstanding Allocations:   169 (max 345)
Number of Pcache Overflow Bytes:     21288 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                43 (max 123)
Successful lookaside attempts:       626
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    17936 bytes
Page cache hits:                     1
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1456 bytes
Statement Heap/Lookaside Usage:      3296 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               16
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        3296
Bytes received by read():            11447
Bytes sent to write():               10648
Read() system calls:                 30
Write() system calls:                11
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         87000 (max 213288) bytes
Number of Outstanding Allocations:   169 (max 345)
Number of Pcache Overflow Bytes:     21288 (max 25136) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                43 (max 123)
Successful lookaside attempts:       648
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    17936 bytes
Page cache hits:                     1
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1456 bytes
Statement Heap/Lookaside Usage:      3296 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               16
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        3296
Bytes received by read():            11547
Bytes sent to write():               11950
Read() system calls:                 32
Write() system calls:                12
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         94408 (max 213288) bytes
Number of Outstanding Allocations:   189 (max 345)
Number of Pcache Overflow Bytes:     25648 (max 25648) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                34 (max 123)
Successful lookaside attempts:       728
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    22280 bytes
Page cache hits:                     4
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1656 bytes
Statement Heap/Lookaside Usage:      2768 bytes
Fullscan Steps:                      0
Sort Operations:                     1
Autoindex Inserts:                   0
Virtual Machine Steps:               46
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2768
Bytes received by read():            11647
Bytes sent to write():               13252
Read() system calls:                 34
Write() system calls:                13
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Memory Used:                         91568 (max 213288) bytes
Number of Outstanding Allocations:   172 (max 345)
Number of Pcache Overflow Bytes:     25648 (max 25648) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                37 (max 123)
Successful lookaside attempts:       733
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    22280 bytes
Page cache hits:                     0
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   1656 bytes
Statement Heap/Lookaside Usage:      2528 bytes
Fullscan Steps:                      0
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               4
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        2528
Bytes received by read():            11747
Bytes sent to write():               14554
Read() system calls:                 36
Write() system calls:                14
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
WARNING: writing to an imposter table will corrupt the "t1bc" index!
Braun|30|3
von|20|2
Memory Used:                         92144 (max 213288) bytes
Number of Outstanding Allocations:   182 (max 345)
Number of Pcache Overflow Bytes:     25648 (max 25648) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                47 (max 123)
Successful lookaside attempts:       856
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    22280 bytes
Page cache hits:                     2
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   2216 bytes
Statement Heap/Lookaside Usage:      4752 bytes
Fullscan Steps:                      1
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               16
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        4752
Bytes received by read():            11847
Bytes sent to write():               16006
Read() system calls:                 38
Write() system calls:                16
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
Braun|30
von|20
Memory Used:                         92168 (max 213288) bytes
Number of Outstanding Allocations:   183 (max 345)
Number of Pcache Overflow Bytes:     25648 (max 25648) bytes
Largest Allocation:                  87200 bytes
Largest Pcache Allocation:           4360 bytes
Lookaside Slots Used:                47 (max 123)
Successful lookaside attempts:       895
Lookaside failures due to size:      4
Lookaside failures due to OOM:       54
Pager Heap Usage:                    22280 bytes
Page cache hits:                     1
Page cache misses:                   0
Page cache writes:                   0
Page cache spills:                   0
Schema Heap Usage:                   2240 bytes
Statement Heap/Lookaside Usage:      4752 bytes
Fullscan Steps:                      1
Sort Operations:                     0
Autoindex Inserts:                   0
Virtual Machine Steps:               15
Reprepare operations:                0
Number of times run:                 1
Memory used by prepared stmt:        4752
Bytes received by read():            11947
Bytes sent to write():               17328
Read() system calls:                 40
Write() system calls:                17
Bytes read from storage:             0
Bytes written to storage:            0
Cancelled write bytes:               0
```

## Expectation

```sql

```

## Flag

```
-stats
```

