## 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 cell_size_check;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
ATTACH DATABASE ':memory:' AS aux73;
.print
ATTACH DATABASE ':memory:' AS aux97;
.timer on
CREATE TEMPORARY TABLE t0(x, y, z);
SELECT -NULL;
SELECT * FrOm sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
BEGIN IMMEDIATE;
.exit -log10(radians(json_group_object('k', -(-(json_array(timediff(NULL, length(-timediff(NULL, '-Inf')timediff(NULL, NULL)))timediff(NULL, NULL), NULL, NULL))))))
PRAGMA read_uncommitted;
PRAGMA ignore_check_constraints <> YES;
PRAGMA legacy_alter_table;
.parameter
CREATE TABLE main.t1(a, b, c, d);
CREATE UNIQUE INDEX i1 ON t1(b, c);
CREATE UNIQUE INDEX i2 ON t1(d COLLATE nocase);
CREATE TABLE t2(x DECIMAL('-',(nan + (unicode('你好') + max(x'af5df3e5294acaf5a4f1de6448da', '2', randomblob(-likelihood(NULL, ceiling(0.5))))))) PRIMARY KEY, y);
CREATE TABLE main.t3(c1 PRIMARY KEY NOT NULL, c2 NOT NULL);
CREATE INDEX i3 ON t3(c2);
CREATE TABLE t4(a, b NOT NULL, c NOT NULL, d NOT NULL);
CREATE UNIQUE /* PRAGMA fullsync = 0; */ INDEX t4i1 ON t4(b, c);
CREATE UNIQUE INDEX t4i2 ON t4(d COLLATE nocase);
SELECT DISTINCT c FROM t1 WHERE NOT b = ?;
SELECT DISTINCT c FROM t1 WHERE b IN (1,2);
SELECT DISTINCT a, b, c COLLATE nocase FROM t1

PRAGMA integrity_check("users");
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_5148 ON t1(lower(c)) WHERE c > 0;
SELECT * FROM t1;
COMMIT;
SELECT COUNT(b) FROM t1;
INSERT INTO t2 DEFAULT VALUES;
WITH cte AS (SELECT * FROM t4) SELECT * FROM cte WHERE c > 0 UNION ALL SELECT * FROM cte WHERE c <= 0;
CREATE TEMP  VIEW IF NOT EXISTS v_t1_244 AS SELECT c FROM t1;
INSERT INTO t1 SELECT * FROM t1;
ALTER TABLE t2 RENAME TO t2_r6544;
INSERT INTO t4 SELECT * FROM t4;
CREATE TRIGGER IF NOT EXISTS trg_t4_4171 BEFORE DELETE ON t4 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
VACUUM;
CREATE TABLE T (
  a TINYINT PRECISION,
  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;
DETACH DATABASE aux97;
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 OR a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
SELECT * FROM T;
ALTER TABLE t2 ADD COLUMN extra_3261 FLOAT;
UPDATE t0 SET z = z + 1 WHERE 1;
WITH cte AS (SELECT CASE WHEN c IS /* PRAGMA defer_foreign_keys = TRUE; */ NULL THEN 0 ELSE c END AS val FROM t1) SELECT * FROM cte;
PRAGMA page_size = 4096;
CREATE  INDEX IF NOT EXISTS idx_t0_8372 ON t0(lower(y)) WHERE y IS NOT NULL;
PRAGMA recursive_triggers = 1;
ALTER TABLE t2 RENAME COLUMN x TO x_r3369;
INSERT OR ABORT INTO t0 VALUES ('x', NULL, '');
INSERT INTO t0 VALUES (NULL, NULL, NULL);
DROP TABLE IF EXISTS t3;
SELECT COUNT(*) FILTER (WHERE y IS NOT NULL), SUM(rowid) FILTER (WHERE y > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(y) FILTER (WHERE y > 0 AND y < 100), COUNT(*) FILTER (WHERE typeof(y) = "text") FROM t2;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
CREATE TRIGGER IF NOT EXISTS trg_t4_6716 AFTER DELETE ON t4 FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
CREATE TRIGGER IF NOT EXISTS trg_t2_5474 BEFORE INSERT ON t2 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA checkpoint_fullsync;
INSERT INTO t1 SELECT * FROM t1;
INSERT OR ABORT INTO t4 VALUES ('', 0, 0, -3);
ALTER TABLE t3 RENAME COLUMN c1 TO c1_r9839;
WITH cte AS (SELECT c1 FROM t3 UNION ALL SELECT c1 FROM t3) SELECT * FROM cte;
SELECT COUNT(*) FILTER (WHERE x IS NOT NULL), SUM(rowid) FILTER (WHERE x > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(x) FILTER (WHERE x > 0 AND x < 100), COUNT(*) FILTER (WHERE typeof(x) = "text") FROM t0;
PRAGMA max_page_count = 5000000;
CREATE TRIGGER IF NOT EXISTS trg_t4_645 AFTER UPDATE ON t4 BEGIN SELECT RAISE(ABORT, 'abort'); END;
VACUUM;
CREATE TRIGGER IF NOT EXISTS trg_t4_7725 BEFORE UPDATE ON t4 BEGIN SELECT RAISE(FAIL, 'no'); END;
DETACH DATABASE aux73;
CREATE  INDEX IF NOT EXISTS idx_t2_3331 ON t2(y COLLATE NOCASE) WHERE y IS NOT NULL;
CREATE  VIEW IF NOT EXISTS v_T_6672 AS SELECT b FROM T;
REINDEX;
ANALYZE T;
ALTER TABLE t0 ADD COLUMN extra_6804 NATIVE CHARACTER(70)NVARCHAR(100) DEFAULT (abs(random()) % 1000);
ALTER TABLE t0 DROP COLUMN y;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(10),
  C INTEGER,
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('a', 'p', -2147483648);
INSERT INTO T VALUES ('b', 'q', 100);
INSERT INTO T VALUES ('b', 'r', 200);
INSERT INTO T VALUES ('c', 's', 300);
INSERT INTO T VALUES ('d', 't', 2147483647);
INSERT INTO T VALUES ('b', 't', 50);
SELECT A, COUNT(*) AS D, SUM(C) AS E FROM T GROUP BY A HAVING COUNT(*) > 1;
SELECT GROUP_CONCAT(d) FROM t4;
ANALYZE t2;
ALTER TABLE t1 ADD COLUMN extra_1405 INT8 DEFAULT '';
SELECT * FROM t2 AS a RIGHT JOIN t0 AS b ON a.rowid = b.rowid;
WITH RECURSIVE multi(a, b, c) AS (VALUES(1, 2, 3) UNION ALL SELECT a+1, b+1, c+1 FROM multi WHERE a<45) SELECT * FROM multi;
DELETE FROM t3 WHERE 1 RETURNING *;
DELETE FROM t3 WHERE c1 > (SELECT AVG(c1) FROM t3);
ANALYZE;
INSERT INTO T SELECT * FROM T;
ALTER TABLE t4 RENAME TO t4_r5482;
SELECT * FROM t3 WHERE c2 <= ANY (SELECT c2 FROM t3);
VACUUM;
SELECT STRING_AGG(b) FROM t4;
SELECT * FROM t3 CROSS JOIN t2;
DELETE FROM t4 WHERE rowid = 69 RETURNING *;
SELECT * FROM t4 WHERE d IN (SELECT DISTINCT d FROM t4);
INSERT INTO T DEFAULT VALUES;
ALTER TABLE T RENAME COLUMN B TO B_r9596;
CREATE  VIEW IF NOT EXISTS v_t1_2631 AS SELECT b FROM t1;
CREATE  INDEX IF NOT EXISTS idx_t3_7394 ON t3(c2);
SELECT * FROM (SELECT y FROM t0 WHERE y IS NOT NULL) AS sub;
CREATE TEMP  VIEW IF NOT EXISTS v_t4_1728 AS SELECT d FROM t4;
DELETE FROM t1 WHERE a IS NULL;
WITH RECURSIVE fib(a,b) AS (VALUES(1,1) UNION ALL SELECT b, a+b FROM fib WHERE b<1000) SELECT a FROM fib;
SELECT COUNT(*) FILTER (WHERE z IS NOT NULL), SUM(rowid) FILTER (WHERE z > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(z) FILTER (WHERE z > 0 AND z < 100), COUNT(*) FILTER (WHERE typeof(z) = "text") FROM t0;
CREATE TRIGGER IF NOT EXISTS trg_T_1938 BEFORE UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
INSERT INTO t4 SELECT * FROM t4;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t0_8908 ON t0((y + 1)) WHERE y > 0;
WITH RECURSIVE cnt(x) AS (VALUES(0) UNION ALL SELECT x-1 FROM cnt WHERE x>-3) SELECT * FROM cnt;
ANALYZE;
REINDEX;
INSERT INTO t4 SELECT * FROM t4;
SELECT * FROM t3;
SELECT * FROM t2 WHERE EXISTS (SELECT 1 FROM t2 WHERE x = NULL);
WITH a AS (SELECT * FROM t1 WHERE d IS NOT NULL), b AS (SELECT * FROM a WHERE d > 0), c AS (SELECT * FROM b LIMIT 10) SELECT * FROM c;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 VALUES (1, NULL, 1, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE t2 RENAME COLUMN y TO y_r7971;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL,
  d REAL
);
INSERT INTO T VALUES (1,'a',40.5,-70.0), (2,'b',-10.25,20.5), (3,'c',9e999,-9e999);
SELECT b FROM T WHERE ABS(c) > 5 AND ABS(d) > 5;
ALTER TABLE t3 DROP COLUMN c2;
```

## Actual output

```sql
0

Run Time: real 0.000 user 0.000050 sys 0.000000

Run Time: real 0.000 user 0.000007 sys 0.000000
Run Time: real 0.000 user 0.000017 sys 0.000000
Run Time: real 0.000 user 0.000044 sys 0.000000
Run Time: real 0.000 user 0.000004 sys 0.000000
```

## Expectation

```sql
0

Run Time: real 0.000038 user 0.000044 sys 0.000000

Run Time: real 0.000005 user 0.000005 sys 0.000000
Run Time: real 0.000011 user 0.000012 sys 0.000000
Run Time: real 0.000043 user 0.000044 sys 0.000000
Run Time: real 0.000003 user 0.000003 sys 0.000000
```

## Flag

```

```

