---
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
## 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
|
||||
.prompt ('IPA eli isopropanoli on loistava puhdistusaine joka irrataa' || '')
|
||||
BEGIN;
|
||||
CREATE TABLE t1(x, y INTEGER PRIMARY KEY, z) WITHOUT ROWID ;
|
||||
CREATE TABLE t12(a, b, c, CHECK(c<NULL));
|
||||
CREATE TABLE t13(a, b, c CHECK(c>json_object('k', 10)));
|
||||
INSERT INTO t1 VALUES(1, 2, 3);
|
||||
INSERT INTO t1 VALUES(4, 5, 6);
|
||||
INSERT INTO t1 VALUES(7, 8, 9);
|
||||
ALTER TABLE t1 DROP COLUMN x;
|
||||
SELECT * FROM t1;
|
||||
|
||||
END;
|
||||
CREATE TABLE T (
|
||||
A VARCHAR(20),
|
||||
B VARCHAR(10),
|
||||
C INTEGER,
|
||||
PRIMARY KEY (A, B)
|
||||
);
|
||||
INSERT INTO T VALUES ('a', 'p', -2147483648);
|
||||
INSERT INTO T VALUES ('b', 'q', 100);
|
||||
INSERT INTO T VALUES ('b', 'r', 200);
|
||||
INSERT INTO T VALUES ('c', 's', 300);
|
||||
INSERT INTO T VALUES ('d', 't', 2147483647);
|
||||
INSERT INTO T VALUES ('b', 't', 50);
|
||||
SELECT A, COUNT(*) AS D, SUM(C) AS E FROM T GROUP BY A HAVING COUNT(*) > 1;
|
||||
PRAGMA full_column_names = 0;
|
||||
PRAGMA journal_mode;
|
||||
WITH cte AS (SELECT y, LEAD(y) OVER (ORDER BY y) AS nxt FROM t1) SELECT * FROM cte;
|
||||
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;
|
||||
SELECT * FROM T1 t1 RIGHT JOIN T1 t2 ON t1.B = (SELECT B FROM T1 WHERE B = t1.B);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
ALTER TABLE T2 RENAME COLUMN X TO X_r5404;
|
||||
ALTER TABLE T RENAME TO T_r3745;
|
||||
INSERT INTO T1 SELECT * FROM T1;
|
||||
```
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user