## 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 trusted_schema = NO;
ATTACH DATABASE ':memory:' AS aux77;
CREATE TABLE T (
  a INT8,
  b REAL
);
INSERT INTO T VALUES ('a',ln(datetime(NULL))), ('b',-CAST(tan(instr(NULL, (concat_ws(',', x'5442321ed72fda7194419b64ac3ae3', trim('  hello  '), 3) + 0))) AS REAL)), ('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 case_sensitive_like == OFF;
BEGIN TRANSACTION;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(substring(printf('%05d', 1), 1) AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE NOT NOT (C > 0) ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); ENd;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES /**/ ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;
.quit
((PRAGMA)) vdbe_debug = -concat(log10(CAST(1 AS DOUBLE)), 2, 3);
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE "T" (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO main.T VALUES ('' || ('a'), 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;
.quit
((PRAGMA)) vdbe_debug = 0;
PRAGMA secure_delete = ON;
PRAGMA wal_autocheckpoint = 1000;
.once log.txt
CREATE TABLE T (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL,
  C BIGINT UNIQUE
);
INSERT INTO T VALUES ('a', 'x', -9223372036854775808);
INSERT INTO T VALUES ('b', 'y', -1000000);
INSERT INTO T VALUES ('c', 'y', 0);
INSERT INTO T VALUES ('d', 'y', 42);
INSERT INTO T VALUES ('e', 'x', 9223372036854775807);
INSERT INTO T VALUES ('f', 'z', 2147483648);
SELECT * FROM T WHERE C > 0 ORDER BY C DESC;
ALTER TABLE T DROP COLUMN B;
ALTER TABLE T RENAME TO T_r2338;
ALTER TABLE T RENAME TO T_r2523;
INSERT INTO T VALUES (1, 'x', 1) ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
PRAGMA trusted_schema = OFF;

UPDATE T SET C = 79 RETURNING *;
SELECT * FROM T AS a FULL OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT C, COUNT(*) FROM T GROUP BY C HAVING C IN (SELECT C FROM T);
REINDEX;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9021 ON T(lower(A));
WITH cte AS (SELECT 1 AS x) INSERT INTO T(C) SELECT x FROM cte WHERE 1=0;
ALTER TABLE T RENAME COLUMN B TO B_r4119;
VACUUM main;
CREATE TRIGGER IF NOT EXISTS trg_T_9843 AFTER DELETE ON T BEGIN SELECT RAISE(FAIL, 'no'); END;
PRAGMA vdbe_debug = 1;
VACUUM main;

CREATE  INDEX IF NOT EXISTS idx_T_8791 ON T(lower(B)) WHERE B IS NOT NULL;
SELECT * FROM T WHERE B <= ANY (SELECT B FROM T);
WITH _m AS MATERIALIZED (SELECT * FROM T2) SELECT * FROM T;
UPDATE T SET A = '';
COMMIT TRANSACTION;
CREATE TABLE T1 (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL UNIQUE
);
CREATE TABLE `_m` (
  A VARCHAR(10) PRIMARY KEY,
  X VARCHAR(15) NOT NULL,
  C BIGINT,
  FOREIGN KEY (X) REFERENCES T1(A)
);
INSERT INTO T1 VALUES ('p', 'x');
INSERT INTO T1 VALUES ('q', 'y');
INSERT INTO T2 VALUES ('a', 'p', 9223372036854775807);
INSERT INTO T2 VALUES ('b', 'q', -9223372036854775808);
SELECT X, SUM(C) AS D, COUNT(*) AS E FROM T2 GROUP BY X;
ANALYZE;
REINDEX;
DROP INDEX IF EXISTS T2;
REINDEX T1;
REINDEX T2;
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 T WHERE (C) IN (SELECT C FROM T);
DETACH DATABASE aux77;
SELECT MIN(A) OVER (ORDER BY A RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM T;
REINDEX T2;

SELECT COUNT(*) FROM T1;
SELECT SUM(X) FROM T2;
ALTER TABLE T2 DROP COLUMN A;
UPDATE T2 SET A = NULL RETURNING *;
UPDATE T2 SET X = json_object('k', X) WHERE X BETWEEN 0 AND 100;
WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<52) SELECT COUNT(*) FROM cnt;
SELECT SUM(C) FROM T;
DROP TRIGGER IF EXISTS T2;
CREATE  VIEW IF NOT EXISTS v_T_7805 AS SELECT B FROM T;
ALTER TABLE T2 DROP COLUMN A;
WITH RECURSIVE pair(a,b) AS (VALUES(0,1) UNION ALL SELECT b, a+b FROM pair WHERE b<100) SELECT * FROM pair;
SELECT * FROM T AS a JOIN T AS b ON a.rowid = b.rowid;
SELECT AVG(A) OVER (PARTITION BY A ORDER BY A) FROM T1;
SELECT LEAD(X, X) OVER (ORDER BY X) FROM T2;
SELECT * FROM T1;
SELECT LAG(A, 2, 'default') OVER (ORDER BY A ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM T;
SELECT * FROM T2 WHERE X IN (SELECT X FROM T2 LIMIT 1);

SELECT COUNT(*) FROM T1;
SELECT * FROM T AS a RIGHT OUTER JOIN T1 AS b ON a.rowid = b.rowid;
PRAGMA module_list;
ALTER TABLE T2 ADD COLUMN extra_4727 CHARINT COLLATE NOCASE;
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 TRIGGER IF NOT EXISTS trg_T2_8325 BEFORE UPDATE OF X ON T2 FOR EACH ROW BEGIN SELECT RAISE(FAIL, 'no'); END;
ALTER TABLE _m DROP COLUMN C;
ALTER TABLE _m RENAME COLUMN A TO A_r8882;
ANALYZE T1;
CREATE TRIGGER IF NOT EXISTS trg__m_3011 AFTER INSERT ON _m BEGIN INSERT INTO _m(C) VALUES (NULL); END;
INSERT INTO T1 SELECT * FROM T1;
SELECT NTILE(4) OVER (PARTITION BY A ORDER BY A ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T;
ALTER TABLE T1 ADD COLUMN extra_6924 NONE DEFAULT (abs(random()) % 1000);
CREATE TEMPORARY  VIEW IF NOT EXISTS v_t1_2528 AS SELECT d FROM t1;
REINDEX _m;
UPDATE T SET B = 'x' WHERE rowid = 1;
```

## Actual output

```sql
Parse error near line 7: no such function: concat_ws
  ,ln(datetime(NULL))), ('b',-CAST(tan(instr(NULL, (concat_ws(',', x'5442321ed72
                                      error here ---^
```

## Expectation

```sql

```

## Flag

```

```

