## 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 incremental_vacuum(100);
.bail off
.clone new_db
BEGIN EXCLUSIVE TRANSACTION;
SAVEPOINT sp374;
ATTACH DATABASE (':memory:' || '') AS aux37;
ATTACH DATABASE ':memory:' AS aux69;
PRAGMA foreign_key_check;
CREATE TABLE t1(a CHARINT PRIMARY KEY, b TEXT, c INT, d INT);
-- PRAGMA legacy_alter_table = OFF;
INSERT INTO t1 VALUES (CAST(CAST((sinh(-concat_ws(NULL, 'a', 'b')) - '$') AS CHARINT) AS ANY), 'Wernher', exp(sqlite_compileoption_used(NULL)), sin(log10(jsonb_extract(total_changes(), '$.key'))));
INSERT INTO t1 VALUES (sqrt(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;
WITH _m AS MATERIALIZED (SELECT * FROM t0) SELECT b, c FROM t1 ORDER BY b, c;
.quit
SAVEPOINT sp9856;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrup_m01.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE NOT NOT (NOT c0 NOT NULL) ;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a LEFT JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT /* PRAGMA defer_foreign_keys = OFF; */ * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 /* hex(NULL) */ BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
CREATE TABLE T (
  a TEXT,
  b INTEGER,
  c REAL
);
INSERT INTO T VALUES ('a',1,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;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
SAVEPOINT sp8755;
ATTACH DATABASE ':memory:' AS aux98;
ATTACH DATABASE ':memory:' AS aux57;
.import corrupt001.db main
BEGIN DEFERRED TRANSACTION;
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (NULL);
CREATE INDEX i0 ON t0(-(-(json_extract((like('1%', 1, '\\') + 0), '$.key')))) WHERE c0 NOT NULL;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) IS FALSE;
SELECT 1 FROM t0 WHERE (t0.c0 IS FALSE) BETWEEN FALSE OR TRUE;
UPDATE t0 SET c0 = 'x' WHERE c0 BETWEEN 0 AND 100 RETURNING *;
ANALYZE t0;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 ORDER BY c0 LIMIT 1 OFFSET 1000);
END;
ANALYZE;
SELECT * FROM t0 AS a INNER JOIN t0 AS b ON a.rowid = b.rowid;
SELECT * FROM t0;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_2416 AS SELECT c0 FROM t0;
SELECT COUNT(*) FROM t0;
DETACH DATABASE aux57;
VACUUM main;
WITH cte AS (SELECT c0, SUM(c0) OVER (ORDER BY c0) AS running FROM t0) SELECT * FROM cte;
PRAGMA trusted_schema;
CREATE TEMP  VIEW IF NOT EXISTS v_t0_3032 AS SELECT c0 FROM t0;
SELECT LEAD(c0, 2) OVER (ORDER BY c0) FROM t0;
DROP TABLE IF EXISTS t0;
WITH a AS (SELECT * FROM t0), b AS (SELECT * FROM t0) SELECT * FROM a UNION ALL SELECT * FROM b;
SELECT COUNT(*) FROM t0;
SELECT * FROM t0 AS a JOIN t0 AS b ON a.rowid = b.rowid;
ALTER TABLE t0 RENAME TO t0_r7864;
DETACH DATABASE aux98;
ROLLBACK TRANSACTION TO SAVEPOINT sp8755;
RELEASE SAVEPOINT sp8755;
ALTER TABLE t0 ADD COLUMN extra_4590 CHARACTER(20) COLLATE RTRIM;
INSERT INTO t0 VALUES (NULL) ON CONFLICT(c0) DO UPDATE SET c0 = excluded.c0;
ALTER TABLE t0 RENAME COLUMN c0 TO c0_r3992;
RELEASE sp9856;
ALTER TABLE t0 ADD COLUMN extra_4953 ANY UNIQUE;
ALTER TABLE t0 DROP COLUMN c0;
DETACH DATABASE aux69;
WITH cte AS (SELECT NULL AS x) SELECT COALESCE(x, 0) FROM cte;
DELETE FROM t0 WHERE 0 RETURNING *;
SELECT * FROM t0 WHERE c0 IN (SELECT c0 FROM t0 WHERE ROW_NUMBER() OVER (ORDER BY c0) = 1);
INSERT OR FAIL INTO t0 VALUES (0);
INSERT INTO t0 DEFAULT VALUES;
DETACH DATABASE aux37;
ALTER TABLE t1 RENAME TO t1_r9055;
DELETE FROM t0 WHERE 1;
ALTER TABLE t1 RENAME COLUMN b TO b_r879;
VACUUM;
PRAGMA full_column_names = FALSE;
CREATE  INDEX IF NOT EXISTS idx_t0_8212 ON t0(c0);
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t0_856 AS SELECT c0 FROM t0;
SELECT MAX(b) FROM t1;
ALTER TABLE t0 RENAME TO t0_r2529;
SELECT * FROM t1;
SELECT * FROM t0 CROSS JOIN t1;
REINDEX;
SELECT COUNT(*) FROM t1;
SELECT * FROM t0 WHERE c0 NOT IN (SELECT c0 FROM t0 WHERE c0 IS NULL);
INSERT INTO t0 SELECT * FROM t0;
DELETE FROM t0 WHERE 0;
ROLLBACK TO sp374;
RELEASE sp374;
PRAGMA vdbe_addoptrace = ON;
INSERT INTO t1 VALUES (NULL, 1, 1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ANALYZE;
UPDATE t1 SET a = json_object('k', a) WHERE a IS NOT NULL;
END TRANSACTION;
INSERT INTO t1 DEFAULT VALUES;
CREATE TRIGGER IF NOT EXISTS trg_t1_8796 BEFORE UPDATE ON t1 FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
INSERT INTO T SELECT * FROM T;
SELECT TOTAL(b) FROM T;
INSERT OR ABORT INTO T VALUES ('', 0, '');
UPDATE t1 SET a = 'x' WHERE a IS NOT NULL;
DROP TRIGGER IF EXISTS t1;
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 T;
SELECT * FROM T;
INSERT INTO t1 DEFAULT VALUES;
INSERT INTO t1 VALUES ('x', 1, 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
INSERT OR IGNORE INTO T VALUES (5, 7, 7);
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t0_1374 AS SELECT c0 FROM t0;
DELETE FROM t1 WHERE c > (SELECT AVG(c) FROM t1) RETURNING *;
WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<0) SELECT * FROM cnt;
INSERT INTO t0 SELECT * FROM t0;
CREATE  INDEX IF NOT EXISTS idx_T_8281 ON T(b COLLATE NOCASE) WHERE b > 0;
ALTER TABLE t1 RENAME TO t1_r1412;
VACUUM main;
REINDEX;
ALTER TABLE t0 DROP COLUMN c0;
INSERT OR ROLLBACK INTO t1 VALUES (NULL, '', 0, NULL);
SELECT * FROM T;
ALTER TABLE t1 ADD COLUMN extra_8623 CHARINT COLLATE NOCASE;
SELECT b, (SELECT AVG(b) FROM T) AS avg_val 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|2
von|20|1
Braun|30
von|20
```

## Expectation

```sql

```

## Flag

```

```

