## 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 aux39;
ATTACH DATABASE ':memory:' AS aux76;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(timediff(2147483646, 2147483646) AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
REINDEX t2;
CREATE TRIGGER IF NOT EXISTS trg_t1_2854 AFTER UPDATE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ALTER TABLE t2 DROP COLUMN x;
ALTER TABLE t2 ADD COLUMN extra_1063 SMALLINT DEFAULT (random());
DETACH DATABASE aux76;
UPDATE t1 SET b = json_object('k', b) WHERE b IS NOT NULL RETURNING *;
SELECT * FROM t1 NATURAL JOIN t1;
WITH a AS (SELECT * FROM t1), b AS (SELECT * FROM a) SELECT * FROM b;
DETACH DATABASE aux39;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_496 ON t2(x) WHERE x > 0;
CREATE TRIGGER IF NOT EXISTS trg_t2_5247 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT LAG(x, 0) OVER (PARTITION BY x ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t2_6266 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ATTACH DATABASE ':memory:' AS aux39;
ATTACH DATABASE ':memory:' AS aux76;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(timediff(2147483646, 2147483646) AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
REINDEX t2;
CREATE TRIGGER IF NOT EXISTS trg_t1_2854 AFTER UPDATE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ALTER TABLE t2 DROP COLUMN x;
ALTER TABLE t2 ADD COLUMN extra_1063 SMALLINT DEFAULT (random());
DETACH DATABASE aux76;
UPDATE t1 SET b = json_object('k', b) WHERE b IS NOT NULL RETURNING *;
SELECT * FROM t1 NATURAL JOIN t1;
WITH a AS (SELECT * FROM t1), b AS (SELECT * FROM a) SELECT * FROM b;
DETACH DATABASE aux39;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_496 ON t2(x) WHERE x > 0;
CREATE TRIGGER IF NOT EXISTS trg_t2_5247 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT LAG(x, 0) OVER (PARTITION BY x ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t2_6266 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ATTACH DATABASE ':memory:' AS aux39;
ATTACH DATABASE ':memory:' AS aux76;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(timediff(2147483646, 2147483646) AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
REINDEX t2;
CREATE TRIGGER IF NOT EXISTS trg_t1_2854 AFTER UPDATE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ALTER TABLE t2 DROP COLUMN x;
ALTER TABLE t2 ADD COLUMN extra_1063 SMALLINT DEFAULT (random());
DETACH DATABASE aux76;
UPDATE t1 SET b = json_object('k', b) WHERE b IS NOT NULL RETURNING *;
SELECT * FROM t1 NATURAL JOIN t1;
WITH a AS (SELECT * FROM t1), b AS (SELECT * FROM a) SELECT * FROM b;
DETACH DATABASE aux39;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_496 ON t2(x) WHERE x > 0;
CREATE TRIGGER IF NOT EXISTS trg_t2_5247 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT LAG(x, 0) OVER (PARTITION BY x ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t2_6266 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ATTACH DATABASE ':memory:' AS aux39;
ATTACH DATABASE ':memory:' AS aux76;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(timediff(2147483646, 2147483646) AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
CREATE TABLE T (
  A VARCHAR(10) PRIMARY KEY,
  B VARCHAR(15) NOT NULL,
  C DOUBLE PRECISION
);
INSERT INTO T VALUES ('a', 'p', -1.7976931348623157e+308);
INSERT INTO T VALUES ('b', 'q', -0.000000001);
INSERT INTO T VALUES ('c', 'r', 0.0);
INSERT INTO T VALUES ('d', 's', 3.14159265358979);
INSERT INTO T VALUES ('e', 't', 1.7976931348623157e+308);
INSERT INTO T VALUES ('f', 't', 750.25);
SELECT B, AVG(C) AS D, MIN(C) AS E, MAX(C) AS F FROM T GROUP BY B;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
CREATE	TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT, d INT);
INSERT INTO t1 VALUES (json_valid(CAST(2147483646 AS DECIMAL(10,5)), 6), '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
SAVEPOINT sp2043;
.progress CAST(9999 AS CLOB)
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(123,'abc'),(234,'def'),(234,'ghi'),(345,'jkl');
CREATE TABLE t2(x,y);
INSERT INTO t2 VALUES(987,'zyx'),(654,'wvu'),(987,'rqp');
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=987 ORDER BY +b;
SELECT *, '|' FROM t1, t2 WHERE a=234 AND x=555;
SELECT *, '|' FROM t1 LEFT JOIN t2 ON a=234 AND x=555;
WITH cte AS (SELECT CASE WHEN x IS NULL THEN 0 ELSE x END AS val FROM t2) SELECT * FROM cte;
ROLLBACK TO sp2043;
RELEASE sp2043;
SELECT * FROM t1 AS a INNER JOIN t1 AS b ON a.rowid = b.rowid;
INSERT INTO t2 VALUES (NULL, NULL);
SELECT * FROM t1 AS a INNER JOIN t2 AS b ON a.rowid = b.rowid;
PRAGMA hard_heap_limit = 50000000;
REINDEX t2;
CREATE TRIGGER IF NOT EXISTS trg_t1_2854 AFTER UPDATE ON t1 BEGIN SELECT RAISE(ABORT, 'abort'); END;
ALTER TABLE t2 DROP COLUMN x;
ALTER TABLE t2 ADD COLUMN extra_1063 SMALLINT DEFAULT (random());
DETACH DATABASE aux76;
UPDATE t1 SET b = json_object('k', b) WHERE b IS NOT NULL RETURNING *;
SELECT * FROM t1 NATURAL JOIN t1;
WITH a AS (SELECT * FROM t1), b AS (SELECT * FROM a) SELECT * FROM b;
DETACH DATABASE aux39;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_t2_496 ON t2(x) WHERE x > 0;
CREATE TRIGGER IF NOT EXISTS trg_t2_5247 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT LAG(x, 0) OVER (PARTITION BY x ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t2;
CREATE TRIGGER IF NOT EXISTS trg_t2_6266 BEFORE DELETE ON t2 BEGIN SELECT RAISE(ABORT, 'abort'); END;
PRAGMA journal_size_limit = 1000000;
WITH cte AS (SELECT * FROM t2), cte2 AS (SELECT * FROM cte) SELECT * FROM cte2;
SELECT * FROM t2;
CREATE  INDEX IF NOT EXISTS idx_t1_6056 ON t1(lower(b));
CREATE  VIEW IF NOT EXISTS v_T_857 AS SELECT A 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|3
von|20|2
Braun|30
von|20
```

## Expectation

```sql

```

## Flag

```

```

