## 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 cell_size_check = OFF;
BEGIN DEFERRED TRANSACTION;
SAVEPOINT sp4295;
SAVEPOINT sp6056;
CREATE TABLE main.t1(a INTEGER PRIMARY /**/ KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (like('%lower%', x'303c152bb6ebe4d8cc67'), 'Wernher', x'98', cos(octet_length(json_set(CAST(x'dc7dea' AS BIGINT), '$.new_key', jsonb_set((min(abs(CAST((1 - 0) AS FLOAT)), 2, 3, 4, 5) * 1), '$.key', 123)))));
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
SELECT AVG(b) FROM t1;
SELECT COUNT(c) FROM t1;
INSERT INTO t1 DEFAULT VALUES;
SELECT STRING_AGG(d) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t1_7391 AS SELECT a FROM t1;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (like('%lower%', 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
SELECT AVG(b) FROM t1;
SELECT COUNT(c) FROM t1;
INSERT INTO t1 DEFAULT VALUES;
SELECT STRING_AGG(d) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t1_7391 AS SELECT a FROM t1;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (like('%lower%', 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
SELECT AVG(b) FROM t1;
SELECT COUNT(c) FROM t1;
INSERT INTO t1 DEFAULT VALUES;
SELECT STRING_AGG(d) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t1_7391 AS SELECT a FROM t1;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (like('%lower%', 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
SELECT AVG(b) FROM t1;
SELECT COUNT(c) FROM t1;
INSERT INTO t1 DEFAULT VALUES;
SELECT STRING_AGG(d) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t1_7391 AS SELECT a FROM t1;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (like('%lower%', 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
SELECT AVG(b) FROM t1;
CREATE TABLE T1 (
  A VARCHAR(20) PRIMARY KEY,
  X VARCHAR(10) UNIQUE
);
CREATE TABLE T2 (
  A VARCHAR(20) PRIMARY KEY,
  Y VARCHAR(10) UNIQUE
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T1 VALUES ('c', 'o');
INSERT INTO T2 VALUES ('b', 'k');
INSERT INTO T2 VALUES ('c', 'l');
SELECT A FROM T1 INTERSECT SELECT A FROM T2;
SELECT COUNT(c) FROM t1;
INSERT INTO t1 DEFAULT VALUES;
SELECT STRING_AGG(d) FROM t1;
CREATE  VIEW IF NOT EXISTS v_t1_7391 AS SELECT a FROM t1;
INSERT INTO t1 DEFAULT VALUES;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
VACUUM main;
CREATE  VIEW IF NOT EXISTS v_t1_6828 AS SELECT a FROM t1;
SELECT * FROM t1 AS a RIGHT JOIN t1 AS b ON a.rowid = b.rowid;
PRAGMA journal_mode = 'OFF';
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_2248 AS SELECT a FROM t1;
ROLLBACK TRANSACTION TO SAVEPOINT sp6056;
RELEASE SAVEPOINT sp6056;
ROLLBACK TRANSACTION TO SAVEPOINT sp4295;
RELEASE SAVEPOINT sp4295;
WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt wHErE x<9) SELECT x FROM cnt WHERE x > 4;
WITH RECURSIVE r AS (SELECT c FROM t1 WHERE c IS NOT NULL UNION ALL SELECT c FROM r WHERE c > 0 LIMIT 10) SELECT * FROM r;
CREATE TEMP  VIEW IF NOT EXISTS v_t1_2021 AS SELECT d FROM t1;
ALTER TABLE t1 RENAME COLUMN c TO c_r8622;
WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<7) SELECT * FROM cnt;
INSERT INTO t1 VALUES ('x', NULL, NULL, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
END TRANSACTION;
WITH cte AS (SELECT d FROM t1 UNION SELECT d FROM t1) SELECT * FROM cte;
UPDATE t1 SET d = json_object('k', d) WHERE 1 RETURNING *;
INSERT INTO t1 DEFAULT VALUES;
PRAGMA writable_schema = 1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_4249 ON t1(lower(d)) WHERE d IS NOT NULL;
CREATE TRIGGER IF NOT EXISTS trg_t1_1965 AFTER UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT COUNT(*) FROM t1;
CREATE TABLE T1 (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) UNIQUE,
  C INTEGER
);
CREATE TABLE T2 (
  X VARCHAR(20) PRIMARY KEY,
  A VARCHAR(10) NOT NULL UNIQUE,
  FOREIGN KEY (A) REFERENCES T1(A)
);
INSERT INTO T1 VALUES ('a', 'p', -2147483648);
INSERT INTO T1 VALUES ('b', 'q', 2147483647);
INSERT INTO T2 VALUES ('m', 'a');
INSERT INTO /* 	 */ T2 VALUES ('n', 'b');
SELECT T2.X, T1.B, T1.C FROM T2, T1 WHERE T2.A = T1.A AND T1.C >= 0;
SELECT * FROM t1 WHERE EXISTS (SELECT 1 FROM t1 WHERE 1 = 1);
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_9913 ON t1((d + 1));
PRAGMA case_sensitive_like = ON;
SELECT * FROM T2 WHERE X > (SELECT MAX(X) FROM T2);
SELECT TOTAL(X) FROM T2;
SELECT * FROM T1;
CREATE  INDEX IF NOT EXISTS idx_t1_310 ON t1(b) WHERE b > 0;
ANALYZE T1;
WITH cte(x) AS (SELECT B FROM T1) SELECT x FROM cte;
WITH cte AS (SELECT * FROM t1) SELECT (SELECT COUNT(*) FROM cte) AS total, * FROM cte LIMIT 1;
REINDEX t1;
ALTER TABLE T2 ADD COLUMN extra_378 TINYINT COLLATE NOCASE;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM t1;
SELECT GROUP_CONCAT(X) OVER (PARTITION BY X ORDER BY X ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM T2;
PRAGMA query_only = OFF;
INSERT INTO t1 VALUES (1, NULL, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
SELECT * FROM t1;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T1_91 ON T1(lower(C)) WHERE C IS NOT NULL;
PRAGMA case_sensitive_like = ON;
INSERT INTO T2 DEFAULT VALUES;
ALTER TABLE t1 RENAME TO t1_r4595;
ANALYZE T2;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
PRAGMA writable_schema = FALSE;
INSERT OR REPLACE INTO T1 VALUES ('x', NULL, 'x');
SELECT * FROM T1 NATURAL JOIN t1;
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
INSERT INTO t1 VALUES (NULL, NULL, NULL, NULL);
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6250 ON T2(lower(X)) WHERE X IS NOT NULL;
WITH a AS (SELECT * FROM T1), RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<44) SELECT * FROM a CROSS JOIN cnt;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t1_7266 ON t1(b);
SELECT LEAD(X, 0, 'default') OVER (ORDER BY X RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T2;
SELECT * FROM t1 AS a RIGHT JOIN T1 AS b ON a.rowid = b.rowid;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T2_3881 AS SELECT A FROM T2;
ANALYZE T1;
```

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

## Expectation

```sql

```

## Flag

```
-nonce "n0Nc3"
```

