## 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
PRAGMA legacy_alter_table = ON;
CREATE TABLE t1(a DOUB PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (-(-(NULL)), 'Wernher', json_quote(123), 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
BEGIN EXCLUSIVE;
CREATE TABLE map_integer (id INT, name);
INSERT INTO map_integer VALUES(lower('你好'),'a');
CREATE TABLE map_text (id TEXT, name);
INSERT INTO map_text VALUES('4','e');
CREATE TABLE `data` (id TEXT, name);
INSERT INTO data VALUES(3547739615393531126,'abc');
INSERT INTO data VALUES('4','xyz');
CREATE VIEW idmap as WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM map_integer) SELECT * FROM map_text) SELECT * FROM _m UNION SELECT * FROM _m;
CREATE TABLE mzed AS SELECT * FROM idmap;
PRAGMA automatic_index=ON;
SELECT * FROM data JOIN idmap USING(id);
SELECT * FROM data AS a LEFT JOIN map_integer AS b ON a.rowid = b.rowid;
CREATE TEMP  VIEW IF NOT EXISTS v_map_integer_6193 AS SELECT name FROM map_integer;
CREATE  VIEW IF NOT EXISTS v_data_9060 AS SELECT name FROM data;
INSERT INTO data SELECT * FROM data;
PRAGMA ignore_check_constraints = 0;
ALTER TABLE data ADD COLUMN extra_9221 TINYINT DEFAULT '';
CREATE TEMPORARY  VIEW IF NOT EXISTS v_map_text_5459 AS SELECT name FROM map_text;
COMMIT;
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;
CREATE TRIGGER IF NOT EXISTS trg_map_text_8647 AFTER DELETE ON map_text FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT NTH_VALUE(id, 0) OVER (PARTITION BY id ORDER BY id ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM map_integer;
REINDEX map_integer;
DELETE FROM map_integer WHERE NOT NOT (0) ;
UPDATE map_text SET id = 'x' WHERE rowid = 1;
DELETE FROM map_integer WHERE rowid = 41;
CREATE  VIEW IF NOT EXISTS v_data_9250 AS SELECT name FROM data;
ALTER TABLE data DROP COLUMN id;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C INTEGER,
  UNIQUE (B, C)
);
INSERT INTO T VALUES ('a', 'p', -2147483648);
INSERT INTO T VALUES ('b', 'q', 700);
INSERT INTO T VALUES ('c', 'r', 0);
INSERT INTO T VALUES ('d', 's', 2147483647);
INSERT INTO T VALUES ('e', 't', -1);
INSERT INTO T VALUES ('f', 'u', 1);
SELECT * FROM T WHERE C BETWEEN -1000 AND 1000 ORDER BY C ASC;
INSERT INTO map_text VALUES (1, 1) ON CONFLICT(id) DO UPDATE SET id = excluded.id, name = excluded.name;
PRAGMA foreign_key_list(users);
SELECT COUNT(*) FROM data;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_7942 AS SELECT C FROM T;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_map_text_1196 ON map_text(id) WHERE id > 0;
SELECT COUNT(C) FROM T;
DELETE FROM T WHERE rowid = 20 RETURNING *;
INSERT OR REPLACE INTO data VALUES (-8, 'x');
SELECT * FROM map_text;
```

## 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|123|1
von|20|2
Braun|30
Wernher|123
von|20
```

## Expectation

```sql
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
Braun|30|3
Wernher|123|1
von|20|2
Braun|30
Wernher|123
von|20
```

## Flag

```

```

