## 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
SAVEPOINT sp4538;
.lint
CREATE TABLE T1 (
  A VARCHAR(5112533368455512899) PRIMARY KEY,
  X VARCHAR(10) UNIQUE
);
CREATE TABLE T2 (
  A VARCHAR(20) PRIMARY KEY,
  Y VARCHAR(10) UNIQUE
);
INSERT INTO T1 VALUES ('a', 'm');
INSERT INTO T1 VALUES ('b', 'n');
INSERT INTO T1 VALUES ('c', 'o');
INSERT INTO T2 VALUES ('b', 'k');
INSERT INTO T2 VALUES ('c', 'l');
SELECT A FROM T1 INTERSECT SELECT A FROM T2;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer -load_extension(NULL)
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items CROSS JOIN A ON (A.Name = Items.ItemName OR Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT NOT (NOT Items.Name = 'Parent') ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer -7992308303611983404
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT Items.Name = 'Parent' ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer -7992308303611983404
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT Items.Name = 'Parent' ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer -7992308303611983404
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT Items.Name = 'Parent' ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer -7992308303611983404
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT Items.Name = 'Parent' ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer /**/ -7992308303611983404
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT Items.Name = 'Parent' ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;
SAVEPOINT sp2713;
SAVEPOINT sp6134;
.timer -7992308303611983404
CREATE TABLE T (
  A VARCHAR(6.283185307179586),
  B VARCHAR(10),
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('' || ('a'), 'p');
INSERT INTO T VALUES ('a', 'q');
INSERT INTO T VALUES ('b', 'q');
INSERT INTO T VALUES ('c', 'r');
INSERT INTO T VALUES ('b', 'r');
INSERT INTO T VALUES ('b', 't');
SELECT B, COUNT(DISTINCT A) AS D FROM T GROUP BY B ORDER BY D DESC, B ASC;
PRAGMA vdbe_trace = OFF;
SAVEPOINT sp8234;
PRAGMA writable_schema = NO;
.exit -x'03bbd57489fa9462044f729a39'
SELECT x'dd97ef423045a84836eda2'x0ACB29BM205381;
SELECT sqlite_compileoption_used('' || ('æçå¤©ä½ æ¯æä¹äº'));
SELECT tan(1) >> -999999999999999999999999999;
SELECT sqlite_compileoption_get($1);
SELECT sqlite_version();
PRAGMA full_column_names;
PRAGMA cache_spill = FALSE;
PRAGMA cache_spill = YES;
.import random-json.db main
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT Items.Name = 'Parent' ORDER BY Items.ItemName;

CREATE UNIQUE  INDEX IF NOT EXISTS idx_B_4512 ON B(Name COLLATE NOCASE);
ALTER TABLE Items RENAME COLUMN ItemName TO ItemName_r8638;

SELECT COUNT(*) FROM Items;
REINDEX;
ALTER TABLE Items DROP COLUMN ItemName;
INSERT INTO B DEFAULT VALUES;
ROLLBACK TO sp8234;
RELEASE sp8234;
SELECT * FROM B WHERE Name IN (SELECT Name FROM B LIMIT 0);
CREATE TRIGGER IF NOT EXISTS trg_B_4400 BEFORE UPDATE OF Name ON B BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ANALYZE A;
SELECT * FROM A WHERE (Name, Name) IN  (SELECT Name, Name FROM A);
ALTER TABLE Items RENAME TO Items_r8580;
SELECT GROUP_CONCAT(Name, Name) OVER (PARTITION BY Name ORDER BY Name ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM B;
UPDATE B SET Name = 84 WHERE Name BETWEEN 0 AND 100;
UPDATE B SET Name = json_object('k', Name) WHERE Name IS NOT NULL;
SELECT * FROM Items AS a JOIN Items AS b ON a.rowid = b.rowid;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
ALTER TABLE A RENAME COLUMN Name TO Name_r3639;
DELETE FROM A WHERE 1 RETURNING *;
INSERT INTO A DEFAULT VALUES;
SELECT * FROM B;
REINDEX B;
CREATE TEMP  VIEW IF NOT EXISTS v_B_3829 AS SELECT Name FROM B;
RELEASE sp6134;
REINDEX Items;
ROLLBACK TRANSACTION TO SAVEPOINT sp2713;
RELEASE SAVEPOINT sp2713;

PRAGMA threads;
SELECT GROUP_CONCAT(Name, '|') FROM A;
ALTER TABLE T RENAME TO T_r162;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_A_4247 AS SELECT Name FROM A;

SELECT COUNT(*) FROM B;
ALTER TABLE T RENAME COLUMN B TO B_r6564;
ROLLBACK TO sp4538;
RELEASE sp4538;
SELECT * FROM A;
ALTER TABLE B RENAME COLUMN Name TO Name_r6116;
CREATE TRIGGER IF NOT EXISTS trg_T2_5163 AFTER INSERT ON T2 FOR EACH ROW BEGIN SELECT RAISE(IGNORE); END;
CREATE TABLE T1 (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL UNIQUE
);
CREATE TABLE T2 (
  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;
PRAGMA vdbe_addoptrace = YES;
DROP INDEX IF EXISTS T;
```

## Actual output

```sql
Usage: /home/test/sqlite3-src/build/sqlite3 [OPTIONS] FILENAME [SQL]
FILENAME is the name of an SQLite database. A new database is created
if the file does not previously exist.
OPTIONS include:
   -append              append the database to the end of the file
   -ascii               set output mode to 'ascii'
   -bail                stop after hitting an error
   -batch               force batch I/O
   -box                 set output mode to 'box'
   -column              set output mode to 'column'
   -cmd COMMAND         run "COMMAND" before reading stdin
   -csv                 set output mode to 'csv'
   -deserialize         open the database using sqlite3_deserialize()
   -echo                print commands before execution
   -init FILENAME       read/process named file
   -[no]header          turn headers on or off
   -help                show this message
   -html                set output mode to HTML
   -interactive         force interactive I/O
   -json                set output mode to 'json'
   -line                set output mode to 'line'
   -list                set output mode to 'list'
   -lookaside SIZE N    use N entries of SZ bytes for lookaside memory
   -markdown            set output mode to 'markdown'
   -maxsize N           maximum size for a --deserialize database
   -memtrace            trace all memory allocations and deallocations
   -mmap N              default mmap size set to N
   -newline SEP         set output row separator. Default: '\n'
   -nofollow            refuse to open symbolic links to database files
   -nonce STRING        set the safe-mode escape nonce
   -nullvalue TEXT      set text string for NULL values. Default ''
   -pagecache SIZE N    use N slots of SZ bytes each for page cache memory
   -quote               set output mode to 'quote'
   -readonly            open the database read-only
   -safe                enable safe-mode
   -separator SEP       set output column separator. Default: '|'
   -stats               print memory stats before each finalize
   -table               set output mode to 'table'
   -tabs                set output mode to 'tabs'
   -version             show SQLite version
   -vfs NAME            use NAME as the default VFS
```

## Expectation

```sql

```

## Flag

```
-help
```

