## 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
ATTACH DATABASE '' || (':memory:') AS aux85;
.auth ON
BEGIN IMMEDIATE TRANSACTION;
.tables non_existent_table
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c INTEGER
);
INSERT INTO T VALUES ((like('%lower%', jsonb_insert(julianday(datetime(abs(1), '+1 day')), '$.key', 0)) + 1),'a',NULL), (2,'b',1), (3,'c',2);
WITH RECURSIVE d(a,b,c,e) AS (
  SELECT *,1 FROM T WHERE c IS NULL
  UNION ALL
  SELECT T.a,T.b,T.c,d.e+1
  FROM T JOIN d ON /* # */ T.c=d.a
)
SELECT * FROM d;
PRAGMA cache_spill = 0;
CREATE TABLE main.[artists] (id integer NOT NULL PRIMARY KEY	AUTOINCREMENT, name varchar(255));
CREATE TABLE albums ( id integer NOT NULL PRIMARY KEY AUTOINCREMENT, name varchar(255), artist_id integer REFERENCES artists);
INSERT INTO artists (name) VALUES ('Ar');
INSERT INTO albums (name, artist_id) VALUES ('Al', 1);
SELECT artists.* FROM artists INNER JOIN artists AS b ON (b.id = artists.id) WHERE (artists.id IN ( SELECT albums.artist_id FROM albums WHERE ((name = 'Al') AND (albums.artist_id IS NOT NULL) AND (albums.id IN ( SELECT id FROM ( SELECT albums.id, row_number() OVER (PARTITION BY /**/ albums.artist_id ORDER BY name) AS x FROM albums WHERE (name = 'Al') ) AS t1 WHERE (x = 1) )) AND (albums.id IN (1, 2))) ));

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
ANALYZE;
REINDEX albums;
REINDEX artists;
SELECT AVG(id) FROM artists;
ALTER TABLE t1 DROP COLUMN c;
DELETE FROM t1 WHERE 0 RETURNING *;
SELECT AVG(b) FROM t1;
CREATE TRIGGER IF NOT EXISTS trg_T_5677 BEFORE UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
WITH cte AS (SELECT a, COUNT(*) AS cnt FROM t1 GROUP BY a) SELECT * FROM cte WHERE cnt > 1;
INSERT INTO t1 SELECT * FROM t1;
UPDATE albums SET artist_id = artist_id + 1 WHERE artist_id IS NOT NULL RETURNING *;
END;
SELECT DENSE_RANK() OVER (PARTITION BY a ORDER BY a RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM t1;
VACUUM main;
INSERT INTO albums VALUES (NULL, NULL, NULL) ON CONFLICT(id) DO UPDATE SET id = excluded.id, name = excluded.name, artist_id = excluded.artist_id;
SELECT * FROM T AS a FULL JOIN t1 AS b ON a.rowid = b.rowid;
DETACH DATABASE aux85;
DROP TABLE IF EXISTS albums;
INSERT INTO albums VALUES (NULL, NULL, NULL);
SELECT * FROM t1 AS a RIGHT JOIN artists AS b ON a.rowid = b.rowid;
ANALYZE;
SELECT * FROM albums AS a LEFT OUTER JOIN albums AS b ON a.rowid = b.rowid;
PRAGMA reverse_unordered_selects = ON;
UPDATE T SET a = 'x' RETURNING *;
```

## Actual output

```sql
authorizer: TRANSACTION "BEGIN" NULL NULL NULL
authorizer: PRAGMA "database_list" NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_master" "name" "aux85" NULL
authorizer: READ "sqlite_master" "type" "aux85" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "aux85" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "aux85" NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: READ "sqlite_master" "type" "main" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_master" "name" "aux85" NULL
authorizer: READ "sqlite_master" "type" "aux85" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "aux85" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "aux85" NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: READ "sqlite_master" "type" "main" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "T" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "T" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: FUNCTION NULL "julianday" NULL NULL
authorizer: FUNCTION NULL "datetime" NULL NULL
authorizer: FUNCTION NULL "abs" NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "T" "a" "main" "d"
authorizer: READ "T" "b" "main" "d"
authorizer: READ "T" "c" "main" "d"
authorizer: READ "T" "c" "main" "d"
authorizer: READ "T" "a" "main" "d"
authorizer: READ "T" "b" "main" "d"
authorizer: READ "T" "c" "main" "d"
authorizer: READ "T" "c" "main" "d"
authorizer: SELECT NULL NULL NULL "d"
authorizer: RECURSIVE NULL NULL NULL "d"
authorizer: SELECT NULL NULL NULL "d"
authorizer: SELECT NULL NULL NULL "d"
authorizer: PRAGMA "cache_spill" "0" NULL NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "artists" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "sqlite_sequence" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "albums" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "artists" NULL "main" NULL
authorizer: INSERT "albums" NULL "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "artists" "id" "main" NULL
authorizer: READ "artists" "name" "main" NULL
authorizer: READ "albums" "artist_id" "main" NULL
authorizer: READ "albums" "name" "main" NULL
authorizer: READ "albums" "artist_id" "main" NULL
authorizer: READ "albums" "id" "main" NULL
authorizer: FUNCTION NULL "row_number" NULL NULL
authorizer: READ "albums" "artist_id" "main" NULL
authorizer: READ "albums" "name" "main" NULL
authorizer: READ "albums" "name" "main" NULL
authorizer: READ "albums" "id" "main" NULL
authorizer: READ "albums" "id" "main" NULL
authorizer: READ "artists" "id" "main" NULL
authorizer: READ "artists" "id" "main" NULL
authorizer: READ "artists" "id" "main" NULL
authorizer: READ "artists" "" NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
1|Ar
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_TABLE "t1" NULL "main" NULL
authorizer: UPDATE "sqlite_master" "type" "main" NULL
authorizer: UPDATE "sqlite_master" "name" "main" NULL
authorizer: UPDATE "sqlite_master" "tbl_name" "main" NULL
authorizer: UPDATE "sqlite_master" "rootpage" "main" NULL
authorizer: UPDATE "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "ROWID" "main" NULL
authorizer: INSERT "t1" NULL "main" NULL
authorizer: INSERT "t1" NULL "main" NULL
authorizer: INSERT "t1" NULL "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: CREATE_INDEX "t1bc" "t1" "main" NULL
authorizer: READ "t1" "b" "main" NULL
authorizer: READ "t1" "c" "main" NULL
authorizer: INSERT "sqlite_master" NULL "main" NULL
authorizer: REINDEX "t1bc" NULL "main" NULL
authorizer: PRAGMA "writable_schema" "ON" NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "sqlite_master" "rootpage" "main" NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: READ "sqlite_master" "type" "main" NULL
authorizer: FUNCTION NULL "like" NULL NULL
authorizer: READ "sqlite_master" "sql" "main" NULL
authorizer: READ "sqlite_master" "rootpage" "main" NULL
authorizer: READ "sqlite_master" "name" "main" NULL
authorizer: READ "sqlite_master" "type" "main" NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: SELECT NULL NULL NULL NULL
authorizer: PRAGMA "index_xinfo" "t1bc" NULL NULL
CREATE TABLE "t2"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
WARNING: writing to an imposter table will corrupt the "t1bc" index!
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "t2" "b" "main" NULL
authorizer: READ "t2" "c" "main" NULL
authorizer: READ "t2" "_ROWID_" "main" NULL
Braun|30|3
Wernher|10|1
von|20|2
authorizer: SELECT NULL NULL NULL NULL
authorizer: READ "t1" "b" "main" NULL
authorizer: READ "t1" "c" "main" NULL
authorizer: READ "t1" "b" "main" NULL
authorizer: READ "t1" "c" "main" NULL
Braun|30
Wernher|10
von|20
```

## Expectation

```sql

```

## Flag

```

```

