## 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 defer_foreign_keys = /**/ NO;
PRAGMA soft_heap_limit = 10000000;
PRAGMA data_store_directory = "/tmp";
.nonce 202cc246-5d25-4977-ac39-9f1516ae7f5e
CREATE TABLE main.T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C INT,
  UNIQUE (B, C)
);
inSERT INTO T VALUES ('' || ('a'), 'p', -2147483648);
INSERT INTO T VALUES ('b', 'q', 700);
INSERT INTO T VALUES ('c', 'r', 0);
INSERT INTO T VALUES ('d', 's', 2147483647);
INSERT INTO T VALUES ('e', 't', -1);
INSERT INTO T VALUES ('f', 'u', 1);
SELECT * FROM T WHERE C BETWEEN -1000 AND 1000 ORDER BY C ASC;
CREATE TEMP  VIEW IF NOT EXISTS v_T_6397 AS SELECT A FROM T;
INSERT INTO T SELECT * FROM T;
WITH cte AS (SELECT NULL AS x) SELECT COALESCE(x, 0) FROM cte;
```

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

