## 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 ignore_check_constraints = NO;
PRAGMA integrity_check;
PRAGMA cell_size_check;
.cd bugs
CREATE TABLE t41(a INTEGER PRIMARY KEY, b INTEGER);
CREATE TABLE t42(d INTEGER PRIMARY KEY, e INTEGER);
CREATE TABLE t43(f INTEGER PRIMARY KEY, g INTEGER);
SELECT * FROM t41 LEFT JOIN (SELECT count(*) AS cnt, x1.d FROM (t42 INNER JOIN t43 ON d=g) AS x1 WHERE x1.d>CAST(NULL AS CLOB) GROUP BY x1.d) AS x2 ON t41.b=x2.d;
SELECT COUNT(*)
FROM t42;
ALTER TABLE t43 ADD COLUMN extra_9040 REAL DEFAULT NULL;
INSERT INTO t42  DEFAULT VALUES;
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE t41 ADD COLUMN extra_3505 CHARACTER(20) COLLATE NOCASE;
SELECT * FROM t42;
```

## Actual output

```sql
SQLite version 3.39.0 2022-05-10 23:28:12
Enter ".help" for usage hints.
sqlite> sqlite> ok
sqlite> 0
sqlite> sqlite> sqlite> sqlite> sqlite> sqlite>    ...> 0
sqlite> sqlite> sqlite>    ...>    ...>    ...>    ...> sqlite> sqlite> sqlite> sqlite> sqlite> sqlite> sqlite> e|x|9223372036854775807
f|z|2147483648
d|y|42
sqlite> sqlite> 1|
sqlite>
```

## Expectation

```sql
SQLite version 3.51.1 2025-11-28 17:28:25
Enter ".help" for usage hints.
sqlite> sqlite> ok
sqlite> 0
sqlite> sqlite> sqlite> sqlite> sqlite> sqlite>    ...> 0
sqlite> sqlite> sqlite> (x1...> (x1...> (x1...> (x1...> sqlite> sqlite> sqlite> sqlite> sqlite> sqlite> sqlite> e|x|9223372036854775807
f|z|2147483648
d|y|42
sqlite> sqlite> 1|
sqlite>
```

## Flag

```
-interactive
```

