## 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 aux71;
.headers off
CREATE TABLE [t1](a REAL PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (printf(NULL, 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
PRAGMA foreign_keys;
-- PRAGMA query_only = TRUE;

.connection
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',concat_ws(',', 1, 2, 3)), ('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;
ANALYZE;
ANALYZE T;
INSERT INTO T VALUES (NULL, NULL, NULL);
SELECT LAST_VALUE(b) OVER (PARTITION BY b ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT COUNT(b) FROM T;
REINDEX;

SELECT COUNT(*) FROM T;
PRAGMA temp_store;
WITH cte(a, b, c) AS (SELECT c, c, c FROM T) SELECT a, b, c FROM cte;
PRAGMA foreign_keys;
-- PRAGMA query_only = TRUE;

.connection
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',concat_ws(',', 1, 2, 3)), ('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;
ANALYZE;
ANALYZE T;
INSERT INTO T VALUES (NULL, NULL, NULL);
SELECT LAST_VALUE(b) OVER (PARTITION BY b ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT COUNT(b) FROM T;
REINDEX;

SELECT COUNT(*) FROM T;
PRAGMA temp_store;
WITH cte(a, b, c) AS (SELECT c, c, c FROM T) SELECT a, b, c FROM cte;
PRAGMA foreign_keys;
-- PRAGMA query_only = TRUE;

.connection
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',concat_ws(',', 1, 2, 3)), ('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;
ANALYZE;
ANALYZE T;
INSERT INTO T VALUES (NULL, NULL, NULL);
SELECT LAST_VALUE(b) OVER (PARTITION BY b ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT COUNT(b) FROM T;
REINDEX;

SELECT COUNT(*) FROM T;
PRAGMA temp_store;
WITH cte(a, b, c) AS (SELECT c, c, c FROM T) SELECT a, b, c FROM cte;
PRAGMA foreign_keys;
-- PRAGMA query_only = TRUE;

.connection
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',concat_ws(',', 1, 2, 3)), ('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;
ANALYZE;
ANALYZE T;
INSERT INTO T VALUES (NULL, NULL, NULL);
SELECT LAST_VALUE(b) OVER (PARTITION BY b ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT COUNT(b) FROM T;
REINDEX;

SELECT COUNT(*) FROM T;
PRAGMA temp_store;
WITH cte(a, b, c) AS (SELECT c, c, c FROM T) SELECT a, b, c FROM cte;
PRAGMA foreign_keys;
-- PRAGMA query_only = TRUE;

.connection
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',concat_ws(',', 1, 2, 3)), ('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;
ANALYZE;
ANALYZE T;
INSERT INTO T VALUES (NULL, NULL, NULL);
SELECT LAST_VALUE(b) OVER (PARTITION BY b ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT COUNT(b) FROM T;
REINDEX;

SELECT COUNT(*) FROM T;
PRAGMA temp_store;
WITH cte(a, b, c) AS (SELECT c, c, c FROM T) SELECT a, b, c FROM cte;
PRAGMA foreign_keys;
-- PRAGMA query_only = TRUE;

.connection
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',concat_ws(',', 1, 2, 3)), ('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;
ANALYZE;
ANALYZE T;
INSERT INTO T VALUES (NULL, NULL, NULL);
SELECT LAST_VALUE(b) OVER (PARTITION BY b ORDER BY b GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT COUNT(b) FROM T;
REINDEX;

SELECT COUNT(*) FROM T;
PRAGMA temp_store;
WITH cte(a, b, c) AS (SELECT c, c, c FROM T) SELECT a, b, c FROM cte;

ALTER TABLE T ADD COLUMN extra_6385 DOUB DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE T ADD COLUMN extra_2442 FLOA COLLATE NOCASE;
ALTER TABLE t1 ADD COLUMN extra_8702 TEXT DEFAULT (random());

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_5476 BEFORE UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
DETACH DATABASE aux71;

SELECT COUNT(*) FROM t1;
DROP INDEX IF EXISTS t1;
ALTER TABLE T RENAME TO T_r9499;
ALTER TABLE T RENAME COLUMN a TO a_r6536;
```

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

```

```

