## 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
.system echo "mwahaha i am root"
BEGIN EXCLUSIVE;
.imposter off
ATTACH DATABASE ':memory:' AS aux0;
CREATE TABLE T (
  a INTEGER,
  b REAL,
  c REAL
);
INSERT INTO T VALUES (cos(1),1.5,10.0), (2,-2.5,20.0), (3,-9e999,30.0);
SELECT * FROM T WHERE b < 2.0 ORDER BY b;
PRAGMA secure_delete = NO;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (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
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',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 aux0;
WITH cte AS (SELECT b, COUNT(*) FROM T GROUP BY b) SELECT * FROM cte;
CREATE  INDEX IF NOT EXISTS idx_t1_2751 ON t1(lower(b));
COMMIT TRANSACTION;
DELETE FROM t1 WHERE c IS NULL;
SELECT * FROM T AS a INNER JOIN T AS b ON a.rowid = b.rowid;
SELECT PERCENT_RANK() OVER (ORDER BY a GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM t1 AS a RIGHT JOIN T AS b ON a.rowid = b.rowid;
SELECT * FROM t1 t1 RIGHT JOIN t1 t2 ON t1.c = (SELECT c FROM t1 WHERE c = t1.c);
```

## Actual output

```sql
mwahaha i am root
3|-Inf|30.0
2|-2.5|20.0
0.54030230586814|1.5|10.0
0
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
mwahaha i am root
3|-Inf|30.0
2|-2.5|20.0
0.54030230586814|1.5|10.0
0
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

```

```

