## 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
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 (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;
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);
```

## Actual output

```sql
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
Braun|30
von|20
```

## Expectation

```sql

```

## Flag

```

```

