## 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 aux78;
CREATE TABLE T1 (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) UNIQUE,
  C INTEGER
);
CREATE TABLE main.T2 (
  X VARCHAR(20) PRIMARY KEY,
  A VARCHAR(10) NOT NULL UNIQUE,
  FOREIGN KEY (A) REFERENCES T1(A)
);
INSERT INTO T1 VALUES ('a', 'p', -2147483648);
INSERT INTO T1 VALUES ('b', 'q', 2147483647);
INSERT INTO T2 VALUES ('m', 'a');
INSERT INTO T2 VALUES ('n', 'b');
SELECT T2.X, T1.B, T1.C FROM T2, T1 WHERE T2.A = T1.A OR T1.C >= 0;
ATTACH DATABASE '' || (':memory:') AS aux69;
-- -cmd "SELECT 1;"

CREATE TABLE T (
  a INT2,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',-concat_ws('|', 'a', 'b', 'c')), ('a','c',jsonb_object('k1', json_quote(coalesce(5.0, 5.0)), 'k2', 5.0)), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
ATTACH DATABASE ':memory:' AS aux60;
BEGIN EXCLUSIVE;
ATTACH DATABASE ':memory:' AS aux0;
-- PRAGMA automatic_index = 1;

.quit
PRAGMA short_column_names > unistr('Hello\u0041');
PRAGMA empty_result_callbacks = OFF;
PRAGMA journal_mode = 'MEMORY';
.expert
CREATE TABLE "t3893"("x");
INSERT INTO t3893 VALUES(format('%.*s', x'295e035cb918ad9d9555' ->> '$', jsonb_object('k', (max(json_array_length(1, '$.nonexistent'), 2, 3, 4, 5) + 0).7976931348623157e+308)));
SELECT "y"."x" FROM (SELECT "x" FROM "t3893") AS "y";


SELECT COUNT(*) FROM t3893;
CREATE TRIGGER IF NOT EXISTS trg_t3893_1953 BEFORE UPDATE ON t3893 BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT LEAD(x, 1, NULL) OVER (PARTITION BY x ORDER BY x RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t3893;
DETACH DATABASE aux0;
WITH cte(x) AS (VALUES(1),(2),(3)) SELECT * FROM t3893 WHERE NOT x IN (SELECT x FROM cte);
SELECT COUNT(*) FILTER (WHERE x IS NOT NULL), SUM(rowid) FILTER (WHERE +x > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(x) FILTER (WHERE +x > 0 AND x < 100), COUNT(*) FILTER (WHERE typeof(x) = "text") FROM t3893;
SELECT LAST_VALUE(x) OVER (PARTITION BY x ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t3893;
INSERT INTO t3893 SELECT * FROM t3893;
ROLLBACK;
INSERT INTO t3893 VALUES (1) ON CONFLICT(x) DO UPDATE SET x = excluded.x;
CREATE  INDEX IF NOT EXISTS idx_t3893_4855 ON t3893(lower(x));
DROP INDEX IF EXISTS t3893;
SELECT * FROM t3893 t1 JOIN (SELECT * FROM t3893) AS sub ON t1.x = sub.x;
SELECT SUM(x) FILTER (WHERE x > 0) OVER (ORDER BY x RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t3893;
DELETE FROM t3893 WHERE x > (SELECT AVG(x) FROM t3893);
WITH cte(x) AS (VALUES(1),(2),(3)) SELECT * FROM t3893 WHERE x IN (SELECT x FROM cte);
WITH RECURSIVE r AS (SELECT x FROM t3893 WHERE x IS NOT NULL UNION ALL SELECT x FROM r WHERE x > 0 LIMIT 10) SELECT * FROM r;
SELECT * FROM t3893;
DETACH DATABASE aux60;
ANALYZE;

VACUUM;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT OR FAIL INTO T VALUES (6, '', '');
ALTER TABLE t3893 RENAME TO t3893_r9196;
INSERT INTO t3893 VALUES (1) ON CONFLICT(x) DO UPDATE SET x = excluded.x;
VACUUM;
SELECT * FROM t3893 AS a LEFT JOIN T AS b ON a.rowid = b.rowid;
REINDEX;
INSERT INTO t3893 SELECT * FROM t3893;
DROP VIEW IF EXISTS t3893;
DELETE FROM t3893 WHERE rowid = 32 RETURNING *;
CREATE  INDEX IF NOT EXISTS idx_t3893_5088 ON t3893((x + 1)) WHERE x > 0;
DETACH DATABASE aux69;
DELETE FROM T WHERE rowid = 59;
SELECT * FROM t3893;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_3907 AS SELECT b FROM T;
DELETE FROM t3893 WHERE x IS NULL RETURNING *;
ALTER TABLE t3893 ADD COLUMN extra_5667 INT2 DEFAULT 0;
PRAGMA auto_vacuum = INCREMENTAL;
SELECT * FROM t3893 AS a INNER JOIN T AS b ON a.rowid = b.rowid;
ALTER TABLE t3893 ADD COLUMN extra_3599 INTEGER DEFAULT CURRENT_TIMESTAMP;
DETACH DATABASE aux78;
ALTER TABLE T1 DROP COLUMN B;
ALTER TABLE T RENAME COLUMN b TO b_r2767;
ALTER TABLE t3893 ADD COLUMN extra_4196 CHARINT COLLATE RTRIM;
INSERT INTO T DEFAULT VALUES;
SELECT COUNT(*) FILTER (WHERE C IS NOT NULL), SUM(rowid) FILTER (WHERE C > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(C) FILTER (WHERE C > 0 AND C < 100), COUNT(*) FILTER (WHERE typeof(C) = "text") FROM T1;
SELECT 0x0ACB29BM205381;
SELECT sqlite_compileoption_used('æçå¤©ä½ æ¯æä¹äº');
SELECT 1 >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
SELECT STRING_AGG(X) FROM T2;
SELECT * FROM t3893 AS a FULL JOIN T2 AS b ON a.rowid = b.rowid;

SELECT COUNT(*) FROM T;
INSERT INTO t3893 SELECT * FROM t3893;
SELECT * FROM T2;
SELECT * FROM T AS a RIGHT OUTER JOIN t3893 AS b ON a.rowid = b.rowid;
ALTER TABLE T2 RENAME TO T2_r1634;
DROP TRIGGER IF EXISTS T1;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T2_1612 AS SELECT X FROM T2;
ALTER TABLE T ADD COLUMN extra_8254 CHAR(10) DEFAULT 0;
DROP TRIGGER IF EXISTS t3893;
WITH a AS (SELECT * FROM T2), b AS (SELECT * FROM a), c AS (SELECT * FROM b), d AS (SELECT * FROM c) SELECT * FROM d;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6783 ON T2(A) WHERE A IS NOT NULL;
INSERT INTO T2 DEFAULT VALUES;
SELECT COUNT(C) FROM T1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_2465 ON T(c COLLATE NOCASE) WHERE c IS NOT NULL;
SELECT * FROM (SELECT * FROM t3893) AS sub;
```

## Actual output

```sql
m|p|-2147483648
m|q|2147483647
n|q|2147483647
```

## Expectation

```sql

```

## Flag

```
-vfs unix-dotfile
```

