## 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
.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, 930489397788253768)timediff(NULL, NULL)))timediff(NULL, NULL), NULL, 1))))))
PRAGMA read_uncommitted;
PRAGMA ignore_check_constraints = YES;
PRAGMA legacy_alter_table;
.parameter
CREATE TABLE 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(10,5) PRIMARY KEY, y);
CREATE TABLE 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 DOUBLE 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 AND 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 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;
```

## Actual output

```sql
Run Time: real 0.000 user 0.000000 sys 0.000134

Run Time: real 0.000 user 0.000000 sys 0.000009
Run Time: real 0.000 user 0.000000 sys 0.000020
Run Time: real 0.000 user 0.000000 sys 0.000074
Run Time: real 0.000 user 0.000000 sys 0.000006
```

## Expectation

```sql
Run Time: real 0.000109 user 0.000119 sys 0.000000

Run Time: real 0.000007 user 0.000008 sys 0.000000
Run Time: real 0.000012 user 0.000012 sys 0.000000
Run Time: real 0.000069 user 0.000066 sys 0.000000
Run Time: real 0.000004 user 0.000004 sys 0.000000
```

## Flag

```

```

