## 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
.prompt 'IPA eli isopropanoli on loistava puhdistusaine joka irrataa'
PRAGMA locking_mode = 'NORMAL';
BEGIN;
.limit
ATTACH DATABASE ':memory:' AS aux77;
ATTACH DATABASE ':memory:' AS aux35;
SAVEPOINT sp5252;
PRAGMA secure_delete = YES;
.exit
.output
.dbconfig
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',cos(json_array(unlikely(-(-(ifnull(-lower('HELLO'), 'fallback')))), -(-(min(cos(json_quote(-2147483649)), NULL)))))), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE main.T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH `_m` AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a INNER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN /**/ b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS /**/ (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');

DROP TRIGGER IF EXISTS T2;
ANALYZE _m;
UPDATE _m SET a = json_object('k', a) WHERE a IS NOT NULL RETURNING *;
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 _m;
ALTER TABLE _m DROP COLUMN a;
SELECT GROUP_CONCAT(a, a) OVER (PARTITION BY a ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM _m;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM _m CROSS JOIN _m;
PRAGMA wal_checkpoint('FULL');
WITH cte AS (SELECT a, COUNT(*) AS cnt FROM T1 GROUP BY a) SELECT * FROM cte;
SELECT * FROM _m AS a JOIN T1 AS b ON a.rowid = b.rowid;
DROP TRIGGER IF EXISTS T;
SELECT * FROM _m;
ALTER TABLE T2 ADD COLUMN extra_9622 CHARINT DEFAULT (random());
CREATE TEMP  VIEW IF NOT EXISTS v_T1_3228 AS SELECT b FROM T1;
ALTER TABLE T1 RENAME COLUMN a TO a_r3245;
SELECT * FROM T1;
ROLLBACK TRANSACTION TO SAVEPOINT sp5252;
RELEASE SAVEPOINT sp5252;
SELECT MIN(b) FROM _m;
CREATE TEMP  VIEW IF NOT EXISTS v__m_8087 AS SELECT b FROM _m;
ANALYZE;
ALTER TABLE T RENAME COLUMN b TO b_r3988;
CREATE TRIGGER IF NOT EXISTS trg__m_318 BEFORE UPDATE OF a ON _m BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T2 RENAME COLUMN a TO a_r4353;
SELECT * FROM T1 AS a FULL JOIN _m AS b ON a.rowid = b.rowid;
SELECT a FROM _m INTERSECT SELECT a FROM (SELECT * FROM _m) AS sub;
SELECT * FROM T AS a INNER JOIN T1 AS b ON a.rowid = b.rowid;
ALTER TABLE T DROP COLUMN c;
PRAGMA empty_result_callbacks = NO;
DETACH DATABASE aux35;
SELECT * FROM T WHERE b IN (SELECT b FROM T WHERE b LIKE "%%");
SELECT * FROM _m CROSS JOIN _m;
INSERT INTO T2 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
INSERT INTO _m VALUES (NULL, NULL);
SELECT SUM(a) FROM T2;
DETACH DATABASE aux77;
VACUUM;
ALTER TABLE T2 RENAME COLUMN b TO b_r4700;
SELECT GROUP_CONCAT(a, '|') FROM T;
INSERT INTO T2 DEFAULT VALUES;
ATTACH DATABASE ':memory:' AS aux77;
ATTACH DATABASE ':memory:' AS aux35;
SAVEPOINT sp5252;
PRAGMA secure_delete = YES;
.exit
.output
.dbconfig
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',cos(json_array(unlikely(-(-(ifnull(-lower('HELLO'), 'fallback')))), -(-(2147483648))))), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a INNER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN /**/ b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS /**/ (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');

DROP TRIGGER IF EXISTS T2;
ANALYZE _m;
UPDATE _m SET a = json_object('k', a) WHERE a IS NOT NULL RETURNING *;
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 _m;
ALTER TABLE _m DROP COLUMN a;
SELECT GROUP_CONCAT(a, a) OVER (PARTITION BY a ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM _m;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM _m CROSS JOIN _m;
PRAGMA wal_checkpoint('FULL');
WITH cte AS (SELECT a, COUNT(*) AS cnt FROM T1 GROUP BY a) SELECT * FROM cte;
SELECT * FROM _m AS a JOIN T1 AS b ON a.rowid = b.rowid;
DROP TRIGGER IF EXISTS T;
SELECT * FROM _m;
ALTER TABLE T2 ADD COLUMN extra_9622 CHARINT DEFAULT (random());
CREATE TEMP  VIEW IF NOT EXISTS v_T1_3228 AS SELECT b FROM T1;
ALTER TABLE T1 RENAME COLUMN a TO a_r3245;
SELECT * FROM T1;
ROLLBACK TRANSACTION TO SAVEPOINT sp5252;
RELEASE SAVEPOINT sp5252;
SELECT MIN(b) FROM _m;
CREATE TEMP  VIEW IF NOT EXISTS v__m_8087 AS SELECT b FROM _m;
ANALYZE;
ALTER TABLE T RENAME COLUMN b TO b_r3988;
CREATE TRIGGER IF NOT EXISTS trg__m_318 BEFORE UPDATE OF a ON _m BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T2 RENAME COLUMN a TO a_r4353;
SELECT * FROM T1 AS a FULL JOIN _m AS b ON a.rowid = b.rowid;
SELECT a FROM _m INTERSECT SELECT a FROM (SELECT * FROM _m) AS sub;
SELECT * FROM T AS a INNER JOIN T1 AS b ON a.rowid = b.rowid;
ALTER TABLE T DROP COLUMN c;
PRAGMA empty_result_callbacks = NO;
DETACH DATABASE aux35;
SELECT * FROM T WHERE b IN (SELECT b FROM T WHERE b LIKE "%%");
SELECT * FROM _m CROSS JOIN _m;
INSERT INTO T2 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
INSERT INTO _m VALUES (NULL, NULL);
SELECT SUM(a) FROM T2;
DETACH DATABASE aux77;
VACUUM;
ALTER TABLE T2 RENAME COLUMN b TO b_r4700;
SELECT GROUP_CONCAT(a, '|') FROM T;
INSERT INTO T2 DEFAULT VALUES;
ATTACH DATABASE ':memory:' AS aux77;
ATTACH DATABASE ':memory:' AS aux35;
SAVEPOINT sp5252;
PRAGMA secure_delete = YES;
.exit
.output
.dbconfig
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',cos(json_array(unlikely(-(-(ifnull(-lower('HELLO'), 'fallback')))), -(-(2147483648))))), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL); /* PRAGMA integrity_check(50); */ INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a INNER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN /**/ b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS /**/ (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b /**/ TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');

DROP TRIGGER IF EXISTS T2;
ANALYZE _m;
UPDATE _m SET a = json_object('k', a) WHERE a IS NOT NULL RETURNING *;
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 _m;
ALTER TABLE _m DROP COLUMN a;
SELECT GROUP_CONCAT(a, a) OVER (PARTITION BY a ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM _m;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM _m CROSS JOIN _m;
PRAGMA wal_checkpoint('FULL');
WITH cte AS (SELECT a, COUNT(*) AS cnt FROM T1 GROUP BY a) SELECT * FROM cte;
SELECT * FROM _m AS a JOIN T1 AS b ON a.rowid = b.rowid;
DROP TRIGGER IF EXISTS T;
SELECT * FROM _m;
ALTER TABLE T2 ADD COLUMN extra_9622 CHARINT DEFAULT (random());
CREATE TEMP  VIEW IF NOT EXISTS v_T1_3228 AS SELECT b FROM T1;
ALTER TABLE T1 RENAME COLUMN a TO a_r3245;
SELECT * FROM T1;
ROLLBACK TRANSACTION TO SAVEPOINT sp5252;
RELEASE SAVEPOINT sp5252;
SELECT MIN(b) FROM _m;
CREATE TEMP  VIEW IF NOT EXISTS v__m_8087 AS SELECT b FROM _m;
ANALYZE;
ALTER TABLE T RENAME COLUMN b TO b_r3988;
CREATE TRIGGER IF NOT EXISTS trg__m_318 BEFORE UPDATE OF a ON _m BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T2 RENAME COLUMN a TO a_r4353;
SELECT * FROM T1 AS a FULL JOIN _m AS b ON a.rowid = b.rowid;
SELECT a FROM _m INTERSECT SELECT a FROM (SELECT * FROM _m) AS sub;
SELECT * FROM T AS a INNER JOIN T1 AS b ON a.rowid = b.rowid;
ALTER TABLE T DROP COLUMN c;
PRAGMA empty_result_callbacks = NO;
DETACH DATABASE aux35;
SELECT * FROM T WHERE b IN (SELECT b FROM T WHERE b LIKE "%%");
SELECT * FROM _m CROSS JOIN _m;
INSERT INTO T2 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
INSERT INTO _m VALUES (NULL, NULL);
SELECT SUM(a) FROM T2;
DETACH DATABASE aux77;
VACUUM;
ALTER TABLE T2 RENAME COLUMN b TO b_r4700;
SELECT GROUP_CONCAT(a, '|') FROM T;
INSERT INTO T2 DEFAULT VALUES;
ATTACH DATABASE ':memory:' AS aux77;
ATTACH DATABASE ':memory:' AS aux35;
SAVEPOINT sp5252;
PRAGMA secure_delete = YES;
.exit
.output
.dbconfig
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',cos(json_array(unlikely(-(-(ifnull(-lower('HELLO'), 'fallback')))), -(-(2147483648))))), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a INNER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN /**/ b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS /**/ (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');
BEGIN TRANSACTION;
-- PRAGMA hard_heap_limit = 50000000;

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),'b',2147483648), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 End) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
.exit --1
ATTACH DATABASE ':memory:' AS aux29;
BEGIN DEFERRED TRANSACTION;
PRAGMA cache_spill = OFF;
PRAGMA default_cache_size = -1000;
PRAGMA soft_heap_limit = 10000000;
.eqp off
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE NOT NOT (c > 0) ;
COMMIT TRANSACTION;
ALTER TABLE T RENAME COLUMN a TO a_r9356;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE _m (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
INSERT INTO T1
VALUES (1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM T1;
DETACH DATABASE aux29;
SELECT LAG(b, 0) OVER (ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
SELECT * FROM T1;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T1 VALUES ('x', 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
PRAGMA application_id;
ALTER TABLE T1 RENAME COLUMN a TO a_r5154;
SELECT * FROM T1;
SELECT * FROM T2 AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
END;
INSERT INTO T1 DEFAULT VALUES;
DELETE FROM T1 WHERE b IS NULL;
ALTER TABLE _m RENAME TO _m_r6295;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 t2 WHERE t2.b = T1.b);
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
DELETE FROM T WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T1_9606 BEFORE DELETE ON T1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
WITH cte(a, b) AS (VALUES(1, "a"),(2, "b"),(3, "c")) SELECT * FROM cte;
SELECT * FROM T WHERE +c < (SELECT AVG(c) FROM T);
SELECT NTH_VALUE(a, 2) OVER (ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
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 T1;
ALTER TABLE T RENAME TO T_r1340;
ALTER TABLE T2 RENAME COLUMN a TO a_r3688;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM T2 CROSS JOIN T;
PRAGMA read_uncommitted = TRUE;
INSERT OR REPLACE INTO T2 VALUES (NULL, 'x');

DROP TRIGGER IF EXISTS T2;
ANALYZE _m;
UPDATE _m SET a = json_object('k', a) WHERE a IS NOT NULL RETURNING *;
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 _m;
ALTER TABLE _m DROP COLUMN a;
SELECT GROUP_CONCAT(a, a) OVER (PARTITION BY a ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM _m;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
SELECT * FROM _m CROSS JOIN _m;
PRAGMA wal_checkpoint('FULL');
WITH cte AS (SELECT a, COUNT(*) AS cnt FROM T1 GROUP BY a) SELECT * FROM cte;
SELECT * FROM _m AS a JOIN T1 AS b ON a.rowid = b.rowid;
DROP TRIGGER IF EXISTS T;
SELECT * FROM _m;
ALTER TABLE T2 ADD COLUMN extra_9622 CHARINT DEFAULT (random());
CREATE TEMP  VIEW IF NOT EXISTS v_T1_3228 AS SELECT b FROM T1;
ALTER TABLE T1 RENAME COLUMN a TO a_r3245;
SELECT * FROM T1;
ROLLBACK TRANSACTION TO SAVEPOINT sp5252;
RELEASE SAVEPOINT sp5252;
SELECT MIN(b) FROM _m;
CREATE TEMP  VIEW IF NOT EXISTS v__m_8087 AS SELECT b FROM _m;
ANALYZE;
ALTER TABLE T RENAME COLUMN b TO b_r3988;
CREATE TRIGGER IF NOT EXISTS trg__m_318 BEFORE UPDATE OF a ON _m BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T2 RENAME COLUMN a TO a_r4353;
SELECT * FROM T1 AS a FULL JOIN _m AS b ON a.rowid = b.rowid;
SELECT a FROM _m INTERSECT SELECT a FROM (SELECT * FROM _m) AS sub;
SELECT * FROM T AS a INNER JOIN T1 AS b ON a.rowid = b.rowid;
ALTER TABLE T DROP COLUMN c;
PRAGMA empty_result_callbacks = NO;
DETACH DATABASE aux35;
SELECT * FROM T WHERE b IN (SELECT b FROM T WHERE b LIKE "%%");
SELECT * FROM _m CROSS JOIN _m;
INSERT INTO T2 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
INSERT INTO _m VALUES (NULL, NULL);
SELECT SUM(a) FROM T2;
DETACH DATABASE aux77;
VACUUM;
ALTER TABLE T2 RENAME COLUMN b TO b_r4700;
SELECT GROUP_CONCAT(a, '|') FROM T;
INSERT INTO T2 DEFAULT VALUES;

END;

SELECT COUNT(*) FROM T;
PRAGMA fullsync = FALSE;
DROP VIEW IF EXISTS T2;
INSERT INTO T VALUES (1, 1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
UPDATE T1 SET b = json_object('k', b) WHERE b IS NOT NULL;
SELECT b, (SELECT MIN(b) FROM T1) AS min_val FROM T1;
SELECT b, (SELECT b FROM T1 LIMIT 1) AS first_val FROM T1;
SELECT * FROM T1 AS a RIGHT JOIN T1 AS b ON a.rowid = b.rowid;
INSERT OR REPLACE INTO T2 VALUES ('', NULL);
INSERT INTO T2 VALUES (1, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
```

## Actual output

```sql
exclusive
              length 1000000000
          sql_length 1000000000
              column 2000
          expr_depth 1000
     compound_select 500
             vdbe_op 250000000
        function_arg 127
            attached 10
 like_pattern_length 50000
     variable_number 32766
       trigger_depth 1000
      worker_threads 0
1
```

## Expectation

```sql
exclusive
              length 1000000000
          sql_length 1000000000
              column 2000
          expr_depth 1000
     compound_select 500
             vdbe_op 250000000
        function_arg 1000
            attached 10
 like_pattern_length 50000
     variable_number 32766
       trigger_depth 1000
      worker_threads 0
1
```

## Flag

```

```

