## 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 aux6;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE c > 0;
PRAGMA module_list;
PRAGMA journal_mode;
PRAGMA user_version;
.prompt 'IPA eli isopropanoli on loistava puhdistusaine joka irrataa'
CREATE TABLE t1(a,b,x);
CREATE TABLE t2(c,d,y);
CREATE INDEX t1b ON t1(b);
CREATE INDEX t2d ON t2(d);
ANALYZE sqlite_master;
INSERT INTO sqlite_stat1 VALUES('t1','t1b','10000 500');
INSERT INTO sqlite_stat1 VALUES('t2','t2d','10000 500');
ANALYZE sqlite_master;
SELECT * FROM t1, t2 WHERE d=b;
SELECT * FROM t1, t2 WHERE d>b AND x=y;
DETACH DATABASE aux6;
SELECT * FROM T WHERE a IN (SELECT a FROM T);
SELECT MAX(x) FROM t1;
PRAGMA soft_heap_limit = 10000000;
CREATE TEMP  VIEW IF NOT EXISTS v_T_6525 AS SELECT a FROM T;
SELECT * FROM t2 AS a JOIN t1 AS b ON a.rowid = b.rowid;
REINDEX;
SELECT SUM(c) OVER (ORDER BY c RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t2;
```

## Actual output

```sql
| a | b |  c   |
|---|---|------|
| 1 | a | 1.25 |
| 3 | c | Inf  |
|      name       |
|-----------------|
| sqlite_dbdata   |
| generate_series |
| completion      |
| fsdir           |
| tables_used     |
| sqlite_stmt     |
| json_tree       |
| fts4aux         |
| fts3            |
| fts4            |
| sqlite_dbptr    |
| fts3tokenize    |
| bytecode        |
| rtree_i32       |
| sqlite_dbpage   |
| rtree           |
| dbstat          |
| json_each       |
| journal_mode |
|--------------|
| memory       |
| user_version |
|--------------|
| 0            |
| a | b |  c   |
|---|---|------|
| 1 | a | 1.25 |
| 2 | b | -3.5 |
| 3 | c | Inf  |
| MAX(x) |
|--------|
|        |
| soft_heap_limit |
|-----------------|
| 10000000        |
```

## Expectation

```sql
| a | b |  c   |
|---|---|------|
| 1 | a | 1.25 |
| 3 | c | Inf  |
|      name       |
|-----------------|
| fsdir           |
| generate_series |
| bytecode        |
| dbstat          |
| tables_used     |
| sqlite_stmt     |
| sqlite_dbpage   |
| rtree_i32       |
| fts4aux         |
| fts3            |
| zipfile         |
| fts4            |
| completion      |
| rtree           |
| fts3tokenize    |
| journal_mode |
|--------------|
| memory       |
| user_version |
|--------------|
| 0            |
| a | b |  c   |
|---|---|------|
| 1 | a | 1.25 |
| 2 | b | -3.5 |
| 3 | c | Inf  |
| MAX(x) |
|--------|
|        |
| soft_heap_limit |
|-----------------|
| 10000000        |
```

## Flag

```
-markdown
```

