## 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;
ATTACH DATABASE '' || (':memory:') AS aux30;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES ((unixepoch(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

WITH _m AS MATERIALIZED (SELECT * FROM t2) SELECT * FROM _m;

SELECT b, c FROM t1 ORDER BY b, c;

.quit
.save output.db
PRAGMA cell_size_check = TRUE;
.timeout -log(('#' || ''), 9223372036854775809)
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL,
  d REAL
);
INSERT INTO T VALUES (nullif(CAST(unixepoch(jsonb_replace(1, '$.key', 1)) AS REAL), 'same'),'a',40.5,-70.0), (2,'b',-10.25,20.5), (3,'c',9e999,-9e999);
SELECT b FROM T WHERE ABS(c) > 5 AND ABS(d) > 5;
CREATE TABLE t1(a INTEGER /* .schema !@#$%^&*()qwertyuiop[]\{}|asdfghjkl;':"zxcvbnm,./<>? */ PRIMARY KEY,R);
CREATE TABLE main.t2(x UNIQUE);
CREATE VIEW v1a(z,y) AS SELECT x IS NULL, x FROM t2;
SELECT a,(+a)b,(+a)b,(+a)b,NOT EXISTS(SELECT null FROM t2),CASE z WHEN max(json_type(487, '$.key'), 487) THEN 992 WHEN 391 THEN 203 WHEN 10 THEN '?k<D Q' END,'' FROM t1 LEFT JOIN v1a ON z=b;

PRAGMA short_column_names = 1;
SELECT LEAD(b) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T;
WITH RECURSIVE fib(a,b,n) AS (VALUES(1,1,1) UnioN ALL SELECT b, a+b, n+1 FROM fib WHERE n<7) SELECT a, n FROM fib;
UPDATE T SET b = b + 1 WHERE b IS NOT NULL;
CREATE  INDEX IF NOT EXISTS idx_t1_565 ON t1(a COLLATE NOCASE) WHERE a IS NOT NULL;
DELETE FROM t1 WHERE 1;
INSERT INTO t2 VALUES (NULL) ON CONFLICT(x) DO UPDATE SET x = excluded.x;
UPDATE T SET c = NULL WHERE c BETWEEN 0 AND 100 RETURNING *;
CREATE  INDEX IF NOT EXISTS idx_T_9869 ON T(c COLLATE NOCASE);
SELECT * FROM t2;

SELECT COUNT(*) FROM t1;
INSERT INTO T SELECT * FROM T;
INSERT INTO t2 DEFAULT VALUES;
DELETE FROM t1 WHERE a IS NULL RETURNING /* PRAGMA query_only = 1; */ *;
SELECT COUNT(x) OVER (ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t2;
SELECT * FROM t1 WHERE a = (SELECT COUNT(*) FROM t1);
ALTER TABLE T RENAME COLUMN c TO c_r3754;
REINDEX T;
SELECT GROUP_CONCAT(b) FROM T;
WITH cte AS (SELECT COUNT(*) AS cnt FROM t2) SELECT * FROM cte WHERE cnt > 0;
SELECT * FROM t2 WHERE NOT EXISTS (SELECT 1 FROM t2 t2 WHERE t2.x = t2.x);
DELETE FROM t2 WHERE x IS NULL;
DROP INDEX IF /**/ EXISTS t1;
ALTER TABLE t2 RENAME TO t2_r4197;
ALTER TABLE T RENAME COLUMN d TO d_r7054;
ALTER TABLE T RENAME COLUMN d TO d_r437;
PRAGMA vdbe_debug = 0;
CREATE TABLE T (
  a TEXT,
  b REAL
);
INSERT INTO T VALUES ('a',100.0), ('b',-200.5), ('c',9e999);
SELECT a,b,
LEAD(b,1) OVER (ORDER BY b DESC) AS c,
NTILE(2) OVER (ORDER BY b DESC) AS d FROM T;
PRAGMA fullsync = 1;
INSERT INTO t2 SELECT * FROM t2;
DETACH DATABASE aux30;
WITH cte AS (SELECT x, COUNT(*) AS cnt FROM t2 GROUP BY x) SELECT * FROM cte WHERE cnt > 1;
ROLLBACK;
SELECT LEAD(a, 2) OVER (ORDER BY a RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM T;
DROP VIEW IF EXISTS t1;
ALTER TABLE T ADD COLUMN extra_8461 DOUBLE;
WITH cte AS (SELECT a, LEAD(a) OVER (ORDER BY a) AS nxt FROM T) SELECT * FROM cte;

SELECT COUNT(*) FROM T;
```

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

## Flag

```

```

