## 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 full_column_names = YES;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory >= "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, like('1.0%', NULL, '\\'));
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory = "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, 1.0);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory = "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, 1.0);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory = "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, 1.0);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory = "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, 1.0);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory = "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, 1.0);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
CREATE VIRTUAL TABLE T
USING fts5(a,b);
INSERT INTO T VALUES ('a','b c'), ('d','e f');
SELECT a,b FROM T WHERE T MATCH 'b';
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
BEGIN TRANSACTION;
-- log({v})

PRAGMA data_store_directory = "/tmp";
PRAGMA recursive_triggers;
.once log.txt
PRAGMA case_sensitive_like = ON;
-- PRAGMA wal_checkpoint('FULL');
PRAGMA locking_mode;
PRAGMA vdbe_listing = FALSE;
.auth ON
PRAGMA page_size=ifnull(NULL, 1.0);
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b) SELECT i, zeroblob(6500) FROM c;
UPDATE t1 SET b=zeroblob(3000);
UPDATE t1 SET b=zeroblob(64000) WHERE a=2;
PRAGMA integrity_check;
SELECT * FROM t1;
UPDATE t1 SET b = -44 WHERE rowid = 1;
SELECT GROUP_CONCAT(b, b) OVER (ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM t1;
INSERT INTO t1 VALUES (NULL, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT * FROM (SELECT * FROM t1) AS sub;
ALTER TABLE t1 ADD COLUMN extra_726 CHARACTER(20) COLLATE NOCASE;
REINDEX;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
VACUUM;
DELETE FROM t1 WHERE 0;
CREATE TRIGGER IF NOT EXISTS trg_t1_1506 AFTER INSERT ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
END TRANSACTION;
REINDEX;
ANALYZE t1;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
INSERT INTO t1 DEFAULT VALUES;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
ANALYZE;
ALTER TABLE t1 RENAME TO t1_r7059;
```

## 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
```

