## 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 trusted_schema = OFF;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (-(-(sqrt((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
BEGIN IMMEDIATE TRANSACTION;
((BEGIN));
CREATE TABLE T (
  a BLOB,
  b INTEGER,
  c REAL
);
INSERT INTO T VALUES (('a' || ''),log10(CAST('^' AS NONE)),pow(2.0, 2.0)), ('a',2,-3.0), ('b',1,4.5);
SELECT a,b,c, /**/ SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
PRAGMA trusted_schema = 0;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (9223372036854775807, '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
BEGIN DEFERRED TRANSACTION;
PRAGMA vdbe_addoptrace = NO;
PRAGMA foreign_keys = 0;
PRAGMA secure_delete = FALSE;
.explain
CREATE TABLE T (
  a TEXT,
  b TEXT
);
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES (1,'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE NOT NOT (NOT NOT (NOT NOT (NOT NOT (c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T LEFT OUTER JOIN d ON T.c=d.a
)
SELECT * FROM d)))) ;
INSERT INTO T VALUES ('a','b'), ('c','d');
SELECT * FROM T WHERE NOT a = REPLACE('a;',';','') AND b = 'b';
SELECT COUNT(*) FROM T;
SELECT * FROM T;
REINDEX;
COMMIT;
SELECT * FROM T WHERE b IN (SELECT b FROM T ORDER BY b LIMIT 1 OFFSET 1000);
ALTER TABLE T DROP COLUMN a;
SELECT SUM(a) FROM T;
SELECT TOTAL(c) FROM t1;
UPDATE T SET c = 'x' WHERE c BETWEEN 0 AND 100 RETURNING *;
CREATE  INDEX IF NOT EXISTS idx_T_1919 ON T(lower(a));
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;
SELECT COUNT(*) FROM T;
DROP TRIGGER IF EXISTS T;
SELECT COUNT(*) FILTER (WHERE c IS NOT NULL), SUM(rowid) FILTER (WHERE c > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), /* .log stdout */ COUNT(*) FILTER (WHERE NULL), AVG(c) FILTER (WHERE c > 0 AND c < 100), COUNT(*) FILTER (WHERE typeof(c) = "text") FROM T;
WITH cte AS (SELECT a FROM T INTERSECT SELECT a FROM T) SELECT * FROM cte;
ALTER TABLE T ADD COLUMN extra_7050 INT8 DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE T ADD COLUMN extra_7163 CHARACTER(20) NOT NULL DEFAULT 0;
ALTER TABLE t1 ADD COLUMN extra_4930 MEDIUMINT COLLATE RTRIM;
UPDATE t1 SET c = 0 WHERE c IS NOT NULL;
ALTER TABLE T RENAME COLUMN b TO b_r2592;
COMMIT TRANSACTION;
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 T;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
END;
ANALYZE;
SELECT * FROM T WHERE c < (SELECT AVG(c) FROM T);
CREATE TRIGGER IF NOT EXISTS trg_T_497 AFTER DELETE ON T FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
SELECT * FROM t1 t1 JOIN t1 t2 ON t1.d = (SELECT d FROM t1 LIMIT 1);
CREATE  INDEX IF NOT EXISTS idx_T_4320 ON T((a + 1)) WHERE a IS NOT NULL;
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 t1;
SELECT * FROM t1 AS a RIGHT OUTER JOIN t1 AS b ON a.rowid = b.rowid;
DELETE FROM T WHERE 1;
ALTER TABLE T ADD COLUMN extra_2146 INT8 COLLATE RTRIM;
SELECT GROUP_CONCAT(c) FROM T;
UPDATE t1 SET c = 4;
CREATE  VIEW IF NOT EXISTS v_t1_3025 AS SELECT d FROM t1;
PRAGMA recursive_triggers = ON;
SELECT * FROM T WHERE a IN (SELECT a FROM T t2 WHERE t2.a = T.a);
CREATE  INDEX IF NOT EXISTS idx_T_677 ON T(a COLLATE NOCASE);
INSERT OR ROLLBACK INTO T VALUES (NULL, 0, '');
SELECT * FROM t1 NATURAL JOIN t1;
VACUUM;
WITH cte AS (SELECT COUNT(*) AS cnt FROM T2) SELECT * FROM cte WHERE cnt > 0;
```

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

```
-tabs
```

