## 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 aux97;
PRAGMA read_uncommitted = 1;
ATTACH DATABASE ':memory:' AS aux72;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES (1,1.5), (2,-7.25), (3,0.0);
SELECT a,b FROM T WHERE a >= 2 ORDER BY b;
PRAGMA empty_result_callbacks = ON;
BEGIN DEFERRED;
ATTACH DATABASE ':memory:' AS aux78;
ATTACH DATABASE ':memory:' AS aux16;
ATTACH DATABASE ':memory:' AS aux83;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a NUMERIC PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((-(-(jsonb_array(-(-(unlikely(like('2147483646?*', NULL))))))) + jsonb_insert(-(-(x'')), '$.key', -json_quote(glob('*helium*', 9223372036854775808)))), '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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
RELEASE sp7579;
INSERT OR ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((0 + 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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((0 + 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;
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m b, c FROM t1 ORDER BY b, c;
.quit
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
CREATE TABLE main.T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((0 + 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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
DETACH DATABASE aux83;
UPDATE t1 SET a = CURRENT_TIMESTAMP WHERE a IS NOT NULL;
REINDEX T;
DELETE FROM t1 WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T_4302 AFTER UPDATE OF c ON T BEGIN INSERT INTO T(c) VALUES (NULL); END;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_8442 ON t1(a) WHERE a IS NOT NULL;
ATTACH DATABASE ':memory:' AS aux83;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a DATE PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((-(-(jsonb_array(2147483646))) + 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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((0 + 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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((0 + 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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',0.0);
SELECT * FROM T WHERE c < 2.0 ORDER BY c;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
PRAGMA short_column_names = OFF;
SAVEPOINT sp7579;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((0 + 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
ALTER TABLE t1 RENAME COLUMN d TO d_r9880;
ROLLBACK TO sp7579;
RELEASE sp7579;
INSERT AND ABORT INTO t1 VALUES /**/ ('', '', 'x', 0);
INSERT INTO t1 SELECT * FROM t1;
DETACH DATABASE aux83;
UPDATE t1 SET a = CURRENT_TIMESTAMP WHERE a IS NOT NULL;
REINDEX T;
DELETE FROM t1 WHERE 1;
CREATE TRIGGER IF NOT EXISTS trg_T_4302 AFTER UPDATE OF c ON T BEGIN INSERT INTO T(c) VALUES (NULL); END;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_8442 ON t1(a) WHERE a IS NOT NULL;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',3.14), (1,'b',-7.75), (2,'c',-9e999);
SELECT b,a,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
DETACH DATABASE aux16;
DELETE FROM T WHERE 1;
WITH RECURSIVE vals(x) AS (SELECT a FROM t1 WHERE a IS NOT NULL UNION ALL SELECT a FROM t1 WHERE a IS NOT NULL LIMIT 10) SELECT * FROM vals;
SELECT * FROM T WHERE EXISTS (SELECT 1 FROM T WHERE 1 = 0);
DETACH DATABASE aux78;
DROP TRIGGER IF EXISTS t1;
SELECT * FROM T;
SELECT COUNT(*) FROM T;
SELECT a FROM T WHERE a = (SELECT MAX(a) FROM T);
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;
REINDEX t1;
CREATE TRIGGER IF NOT EXISTS trg_T_2166 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(10),
  C INTEGER,
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('a', 'p', -2147483648);
INSERT INTO T VALUES ('b', 'q', 100);
INSERT INTO T VALUES ('b', 'r', 200);
INSERT INTO T VALUES ('c', 's', 300);
INSERT INTO T VALUES ('d', 't', 2147483647);
INSERT INTO T VALUES ('b', 't', 50);
SELECT A, COUNT(*) AS D, SUM(C) AS E FROM T GROUP BY A HAVING COUNT(*) > 1;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
CREATE TEMP  VIEW IF NOT EXISTS v_t1_9643 AS SELECT d FROM t1;
VACUUM;
CREATE TEMP  VIEW IF NOT EXISTS v_T_6699 AS SELECT B FROM T;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
SELECT GROUP_CONCAT(c, '.') OVER (ORDER BY c ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM t1;
VACUUM main;
END;
ALTER TABLE T ADD COLUMN extra_9586 INT DEFAULT (abs(random()) % 1000);
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;
ALTER TABLE T RENAME COLUMN A TO A_r250;

SELECT COUNT(*) FROM T;
ALTER TABLE t1 RENAME COLUMN d TO d_r4327;
PRAGMA recursive_triggers = NO;
ALTER TABLE t1 RENAME COLUMN d TO d_r6731;
INSERT OR ROLLBACK INTO t1 VALUES (0, NULL, 0, 0);
WITH RECURSIVE pair(a,b) AS (VALUES(0,1) UNION ALL SELECT b, a+b FROM pair WHERE b<100) SELECT * FROM pair;
DELETE FROM t1 WHERE rowid = 79;
SELECT * FROM t1 WHERE EXISTS (SELECT 1 FROM t1 WHERE d < 0);
DETACH DATABASE aux72;
SELECT * FROM T AS a LEFT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM T WHERE B IN (SELECT B FROM T LIMIT 0);
SELECT * FROM T WHERE B >= ALL (SELECT B FROM T);
DETACH DATABASE aux97;
INSERT INTO T DEFAULT VALUES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
```

## Actual output

```sql
2|-7.25
3|0.0
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|2
von|20|1
Braun|30
von|20
```

## Expectation

```sql

```

## Flag

```

```

