## 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
ATTACH DATABASE ':memory:' AS aux91;
creATE VIRTUAL TABLE t0 USING fts3("x", "y", "z");
DROP TABLE t0;
SAVEPOINT sp9494;
BEGIN IMMEDIATE;
-- PRAGMA vdbe_debug = 1;

ATTACH DATABASE ':memory:' AS aux69;
ATTACH DATABASE ':memory:' AS aux35;
PRAGMA foreign_keys=ON;
    CREATE TABLE t1(x INT PRIMARY KEY);
    INSERT INTO t1 VALUES(json_array_length(-(-((CAST(typeof(';') AS ANY) + format('%.*s', NULL, sign('10'))))), '$.nonexistent'));
    INSERT INTO t1 VALUES(101);
    CREATE TABLE t2(y INTEGER REFERENCES t1 (x));
    INSERT INTO t2 VALUES(100);
    INSERT INTO t2 VALUES(101);
    SELECT 1, x FROM t1;
    SELECT 2, y FROM t2;

WITH cte AS (SELECT y, COUNT(*) AS cnt FROM t2 GROUP BY y) SELECT * FROM cte;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_6036 ON t2(y) WHERE NOT NOT NOT (NOT y IS NOT NULL) ;
SELECT * FROM t1 WHERE x IN (SELECT x FROM t1 t2 WHERE t2.x = t1.x);
WITH a AS (SELECT * FROM t2), b AS (SELECT * FROM a) SELECT * FROM b;
DROP INDEX IF EXISTS t1;
DELETE FROM t1 WHERE 0;
DETACH DATABASE aux35;
CREATE TRIGGER IF NOT EXISTS trg_t1_148 BEFORE INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
CREATE TRIGGER IF NOT EXISTS trg_t2_6723 AFTER UPDATE ON t2 FOR EACH ROW BEGIN INSERT INTO t2(y) VALUES (NULL); END;
INSERT INTO t2 SELECT * FROM t2;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_4672 ON t1(x COLLATE NOCASE) WHERE x > 0;
PRAGMA cell_size_check = ON;
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 t1;
DETACH DATABASE aux69;
SELECT MIN(x) FROM t1;
REINDEX;
WITH cte(x, y) AS (VALUES(1,2),(3,4),(5,6)) SELECT * FROM cte;
VACUUM main;
COMMIT TRANSACTION;
INSERT INTO t2 VALUES ('x') ON CONFLICT(y) DO UPDATE SET y = excluded.y;
RELEASE sp9494;
DELETE FROM t2 WHERE y > (SELECT AVG(y) FROM t2);
DELETE FROM t2 WHERE y IS NULL;
UPDATE t1 SET x = '' WHERE rowid = 1 RETURNING *;
SELECT * FROM t1 WHERE x = (SELECT MAX(x) FROM t1 WHERE x = (SELECT MAX(x) FROM t1));
ALTER TABLE t1 ADD COLUMN extra_9088 DATE NOT NULL DEFAULT 0;
WITH RECURSIVE cte AS (SELECT y FROM t2 UNION ALL SELECT y FROM cte LIMIT 1) SELECT * FROM cte;
DETACH DATABASE aux91;
SELECT LAG(y, 2, 'default') OVER (PARTITION BY y ORDER BY y GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t2;
ANALYZE t1;
```

## Actual output

```sql
3.39.0 2022-05-10 23:28:12 764b71267e0b31ff7eaf2a0def7526a1a02dce4d5b456dea060d97ed342ealt1
```

## Expectation

```sql
3.51.1 2025-11-28 17:28:25 281fc0e9afc38674b9b0991943b9e9d1e64c6cbdb133d35f6f5c87ff6af38a88 (64-bit)
```

## Flag

```
-version
```

