## 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 TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((1 + 0), '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 T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (json_replace(1, '$.key', 1),1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA empty_result_callbacks = ON;
ATTACH DATABASE ':memory:' AS aux35;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
-- .echo off

INSERT INTO T VALUES	('a','b',min(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;
DETACH DATABASE aux35;
UPDATE T SET c = -20 WHERE 1;
ALTER TABLE T ADD COLUMN extra_1185 INTEGER DEFAULT '';
SELECT COUNT(*) FROM T;
SELECT COUNT(*) FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA empty_result_callbacks = ON;
ATTACH DATABASE ':memory:' AS aux35;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
-- .echo off

INSERT INTO T VALUES	('a','b',min(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;
DETACH DATABASE aux35;
UPDATE T SET c = -20 WHERE 1;
ALTER TABLE T ADD COLUMN extra_1185 INTEGER DEFAULT '';
SELECT COUNT(*) FROM T;
SELECT COUNT(*) FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA empty_result_callbacks = ON;
ATTACH DATABASE ':memory:' AS aux35;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
-- .echo off

INSERT INTO T VALUES	('a','b',min(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;
DETACH DATABASE aux35;
UPDATE T SET c = -20 WHERE 1;
ALTER TABLE T ADD COLUMN extra_1185 INTEGER DEFAULT '';
CREATE TABLE T1 (
  A VARCHAR(20),
  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;
SELECT COUNT(*) FROM T;
SELECT COUNT(*) FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
PRAGMA empty_result_callbacks = ON;
ATTACH DATABASE ':memory:' AS aux35;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
-- .echo off

INSERT INTO T VALUES	('a','b',min(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;
DETACH DATABASE aux35;
UPDATE T SET c = -20 WHERE 1;
ALTER TABLE T ADD COLUMN extra_1185 INTEGER DEFAULT '';
SELECT COUNT(*) FROM T;
SELECT COUNT(*) FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
VACUUM;
INSERT INTO T DEFAULT VALUES;
DROP TABLE IF EXISTS T1;
SELECT AVG(a) FROM T2;
```

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

```

```

