## 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
CREATE TEMPORARY TABLE t0(x, y, z);
SELECT -if(0.0, 99999999999999999999999999999999999999999999999999, 99999999999999999999999999999999999999999999999999);
SELECT * FROM sqlite_temp_master WHERE sql GLOB '000[]***';
DROP TABLE t0;
PRAGMA trusted_schema = 9223372036854775806;
.log stderr
CREATE TABLE main.t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (1, 'Wernher', 10, 100);
INSERT INTO t1 VALUES (2, 'von', 20, 200);
INSERT INTO t1 VALUES (3, 'Braun', 30, 300);

CREATE INDEX t1bc ON t1(b, c);

PRAGMA writable_schema = ON;

.imposter t1bc t2

SELECT * FROM t2;

SELECT b, c FROM t1 ORDER BY b, c;

.quit
ATTACH DATABASE ':memory:' AS aux86;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (soundex('123'),'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE NOT c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON T.c=d.a
)
SELECT * FROM d;
BEGIN;
PRAGMA mmap_size;
PRAGMA fullsync = OFF;
PRAGMA freelist_count;
PRAGMA cache_spill = TRUE;
.backup main output.db
CREATE TABLE T1 (
  A VARCHAR(-9223372036854775809),
  X VARCHAR(10),
  PRIMARY KEY (A, X),
  UNIQUE (X)
);
CREATE TABLE T2 (
  A VARCHAR(20),
  Y VARCHAR(10) UNIQUE,
  PRIMARY KEY (A, Y)
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T2 VALUES ('b', 'k');
SELECT A FROM T1 UNION ALL SELECT A FROM T2 ORDER BY A;
INSERT INTO T2 VALUES (NULL, NULL);
REINDEX;

SELECT COUNT(*) FROM T1;
END TRANSACTION;
WITH RECURSIVE r AS (SELECT X FROM T1 WHERE X IS NOT NULL UNION ALL SELECT X FROM r WHERE X > 0 LIMIT 10) SELECT * FROM r;
SELECT LAG(X, X) OVER (ORDER BY X ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T1;
CREATE TRIGGER IF NOT EXISTS trg_T2_4613 BEFORE DELETE ON T2 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;

WITH a AS (SELECT * FROM T2), RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<49) SELECT * FROM a CROSS JOIN cnt;
DETACH DATABASE aux86;
ALTER TABLE T1 ADD COLUMN extra_8201 INT8 DEFAULT 0;
ALTER TABLE T2 RENAME TO T2_r8773;
REINDEX T1;
DELETE FROM t1 WHERE rowid = 31 RETURNING *;
WITH cte AS (SELECT CASE WHEN c > 0 THEN "pos" ELSE "neg" END AS sign FROM T) SELECT * FROM cte;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_5738 ON t1(lower(d)) WHERE d IS NOT NULL;
SELECT * FROM T1;

SELECT COUNT(*) FROM t1;
WITH cte(x) AS (SELECT A FROM T2) SELECT x FROM cte;
INSERT OR IGNORE INTO T2 VALUES (-9, '');
CREATE  VIEW IF NOT EXISTS v_T_2236 AS SELECT b FROM T;
DELETE FROM T WHERE 0 RETURNING *;
SELECT COUNT(*) FILTER (WHERE Y IS NOT NULL), SUM(rowid) FILTER (WHERE Y > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(Y) FILTER (WHERE Y > 0 AND Y < 100), COUNT(*) FILTER (WHERE typeof(Y) = "text") FROM T2;
INSERT INTO t0 DEFAULT VALUES;

SELECT COUNT(*) FROM T2;
PRAGMA case_sensitive_like = 0;
CREATE TRIGGER IF NOT EXISTS trg_T1_4296 BEFORE UPDATE OF X ON T1 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
UPDATE T SET b = 'x' WHERE rowid = 1;
DELETE FROM T WHERE 1;
```

## Actual output

```sql
1
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
WARNING: writing to an imposter table will corrupt the "t1bc" index!
Braun|30|3
Wernher|10|1
von|20|2
Braun|30
Wernher|10
von|20
```

## Expectation

```sql

```

## Flag

```
-cmd "SELECT 1;"
```

