## 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
SAVEPOINT sp1405;
PRAGMA full_column_names = YES;
PRAGMA soft_heap_limit = 10000000;
PRAGMA checkpoint_fullsync = OFF;
.auth ON
CREATE TABLE t3(x,y);
INSERT INTO t3 VALUES(1,NULL);
INSERT INTO t3 VALUES(2,NULL);
INSERT INTO t3 VALUES(3,4);
SELECT count(x), y FROM t3 GROUP BY y ORDER BY 1;

PRAGMA recursive_triggers;
UPDATE t3 SET x = 'x' WHERE x IS NOT NULL RETURNING *;
WITH cte AS (SELECT * FROM t3 WHERE x IS NOT NULL) SELECT * FROM cte;
ANALYZE;
REINDEX;
INSERT INTO t3 VALUES (NULL, NULL);
CREATE TRIGGER IF NOT EXISTS trg_t3_8438 AFTER INSERT ON t3 FOR EACH ROW BEGIN INSERT INTO t3(y) VALUES (NULL); END;
UPDATE t3 SET y = CURRENT_TIMESTAMP WHERE 1;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t3_4714 AS SELECT x FROM t3;
RELEASE sp1405;
SELECT * FROM t3 AS a LEFT OUTER JOIN t3 AS b ON a.rowid = b.rowid;
ANALYZE t3;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
```

## Actual output

```sql
10000000
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "t3" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: FUNCTION NULL "count" NULL NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
authorizer: READ "t3" "y" "main" NULL
1|4
2|
authorizer: PRAGMA "recursive_triggers" NULL NULL NULL
0
authorizer: UPDATE "t3" "x" "main" NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
x|
x|
x|4
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "t3" "x" "main" "cte"
authorizer: READ "t3" "y" "main" "cte"
authorizer: READ "t3" "x" "main" "cte"
authorizer: SELECT NULL NULL NULL "cte"
x|
x|
x|4
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "sqlite_stat1" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: ANALYZE "t3" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_stat1" "tbl" "main" NULL
authorizer: READ "sqlite_stat1" "idx" "main" NULL
authorizer: READ "sqlite_stat1" "stat" "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: CREATE_TRIGGER "trg_t3_8438" "t3" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: FUNCTION NULL "current_timestamp" NULL NULL
authorizer: UPDATE "t3" "y" "main" NULL
authorizer: INSERT "sqlite_temp_master" NULL "temp" NULL
authorizer: CREATE_TEMP_VIEW "v_t3_4714" NULL "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "type" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "name" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "tbl_name" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "rootpage" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "sql" "temp" NULL
authorizer: READ "sqlite_temp_master" "ROWID" "temp" NULL
authorizer: SAVEPOINT "RELEASE" "sp1405" NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
authorizer: READ "t3" "ROWID" "main" NULL
authorizer: READ "t3" "ROWID" "main" NULL
x|2026-05-15 11:31:25|x|2026-05-15 11:31:25
x|2026-05-15 11:31:25|x|2026-05-15 11:31:25
x|2026-05-15 11:31:25|x|2026-05-15 11:31:25
|2026-05-15 11:31:25||2026-05-15 11:31:25
authorizer: DELETE "sqlite_stat1" NULL "main" NULL
authorizer: READ "sqlite_stat1" "tbl" "main" NULL
authorizer: ANALYZE "t3" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_stat1" "tbl" "main" NULL
authorizer: READ "sqlite_stat1" "idx" "main" NULL
authorizer: READ "sqlite_stat1" "stat" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "T" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "T" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "T" "a" "main" NULL
authorizer: READ "T" "b" "main" NULL
authorizer: READ "T" "c" "main" NULL
authorizer: FUNCTION NULL "rank" NULL NULL
authorizer: READ "T" "a" "main" NULL
authorizer: READ "T" "c" "main" NULL
authorizer: SELECT NULL NULL NULL NULL
a|b|5.0|1
a|c|5.0|1
b|d|-8.25|1
```

## Expectation

```sql
10000000
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "t3" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: FUNCTION NULL "count" NULL NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
authorizer: READ "t3" "y" "main" NULL
1|4
2|
authorizer: PRAGMA "recursive_triggers" NULL NULL NULL
0
authorizer: UPDATE "t3" "x" "main" NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
x|
x|
x|4
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "t3" "x" "main" "cte"
authorizer: READ "t3" "y" "main" "cte"
authorizer: READ "t3" "x" "main" "cte"
authorizer: SELECT NULL NULL NULL "cte"
x|
x|
x|4
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "sqlite_stat1" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: ANALYZE "t3" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_stat1" "tbl" "main" NULL
authorizer: READ "sqlite_stat1" "idx" "main" NULL
authorizer: READ "sqlite_stat1" "stat" "main" NULL
authorizer: INSERT "t3" NULL "main" NULL
authorizer: CREATE_TRIGGER "trg_t3_8438" "t3" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: FUNCTION NULL "current_timestamp" NULL NULL
authorizer: UPDATE "t3" "y" "main" NULL
authorizer: INSERT "sqlite_temp_master" NULL "temp" NULL
authorizer: CREATE_TEMP_VIEW "v_t3_4714" NULL "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "type" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "name" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "tbl_name" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "rootpage" "temp" NULL
authorizer: UPDATE "sqlite_temp_master" "sql" "temp" NULL
authorizer: READ "sqlite_temp_master" "ROWID" "temp" NULL
authorizer: SAVEPOINT "RELEASE" "sp1405" NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
authorizer: READ "t3" "x" "main" NULL
authorizer: READ "t3" "y" "main" NULL
authorizer: READ "t3" "ROWID" "main" NULL
authorizer: READ "t3" "ROWID" "main" NULL
x|2026-05-15 11:31:25|x|2026-05-15 11:31:25
x|2026-05-15 11:31:25|x|2026-05-15 11:31:25
x|2026-05-15 11:31:25|x|2026-05-15 11:31:25
|2026-05-15 11:31:25||2026-05-15 11:31:25
authorizer: DELETE "sqlite_stat1" NULL "main" NULL
authorizer: READ "sqlite_stat1" "tbl" "main" NULL
authorizer: ANALYZE "t3" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_stat1" "tbl" "main" NULL
authorizer: READ "sqlite_stat1" "idx" "main" NULL
authorizer: READ "sqlite_stat1" "stat" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "T" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: INSERT "T" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "T" "a" "main" NULL
authorizer: READ "T" "b" "main" NULL
authorizer: READ "T" "c" "main" NULL
authorizer: FUNCTION NULL "rank" NULL NULL
authorizer: READ "T" "a" "main" NULL
authorizer: READ "T" "c" "main" NULL
authorizer: SELECT NULL NULL NULL NULL
a|b|5.0|1
a|c|5.0|1
b|d|-8.25|1
```

## Flag

```

```

