## 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
BEGIN IMMEDIATE;
ATTACH DATABASE ':memory:' AS aux84;
CREATE TABLE 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
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
PRAGMA wal_checkpoint('NOOP');
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA wal_autocheckpoint;
CREATE TABLE t0(c0 REAL, c1 REAL GENERATED ALWAYS AS (c0));
INSERT INTO t0(c0) VALUES (substr('~', -2));
SELECT * FROM t0 GROUP BY c0;
CREATE TABLE t1(a, b);
CREATE TABLE t2(c, d);
SELECT max(t1.a), (SELECT 'xyz' FROM (SELECT * FROM t2 WHERE NOT 0) WHERE t1.b=1) FROM t1;

DETACH DATABASE aux37;
ALTER TABLE t2 RENAME TO t2_r3597;
VACUUM main;
INSERT INTO t1 DEFAULT VALUES;
UPDATE t0 SET c0 = '' WHERE 1;
SELECT * FROM t1 AS a LEFT JOIN t1 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r8631;
INSERT INTO t0 VALUES (NULL, NULL);
WITH cte AS (SELECT CASE WHEN b > 0 THEN "pos" ELSE "neg" END AS sign FROM t1) SELECT * FROM cte;
CREATE  VIEW IF NOT EXISTS v_t1_8454 AS SELECT a FROM t1;
REINDEX t0;
DETACH DATABASE aux84;
SELECT NTH_VALUE(b, 1) OVER (PARTITION BY b ORDER BY b RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t1;
ROLLBACK;
SELECT SUM(A) FROM T;
ALTER TABLE T ADD COLUMN extra_8486 CHARINT DEFAULT 0;
WITH cte AS (SELECT C, COUNT(*) AS cnt FROM T GROUP BY C) SELECT * FROM cte WHERE cnt > 1;

SELECT COUNT(*) FROM t0;
```

## Actual output

```sql
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
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
Braun|30|3
Wernher|10|1
von|20|2
Braun|30
Wernher|10
von|20
```

## Flag

```

```

