---
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
## 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
|
||||
.log stderr
|
||||
BEGIN IMMEDIATE;
|
||||
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;
|
||||
.system
|
||||
SAVEPOINT sp1151;
|
||||
CREATE TABLE T (
|
||||
a TEXT,
|
||||
b TEXT,
|
||||
c REAL
|
||||
);
|
||||
INSERT INTO T VALUES ('a','b',load_extension('/nonexistent.so')), ('a','c',5.0), ('b','d',-8.25);
|
||||
SELECT a,b,c,
|
||||
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
|
||||
ROLLBACK TO sp1151;
|
||||
RELEASE sp1151;
|
||||
UPDATE T SET a = '' WHERE NOT NOT (rowid = 1) ;
|
||||
SELECT MIN(A) FROM T2;
|
||||
ALTER TABLE T DROP COLUMN a;
|
||||
INSERT INTO T1 VALUES (NULL, NULL);
|
||||
COMMIT TRANSACTION;
|
||||
INSERT INTO T SELECT * FROM T;
|
||||
SELECT X, COUNT(*) FROM T2 GROUP BY X HAVING COUNT(*) = (SELECT COUNT(*) FROM T2);
|
||||
ALTER TABLE T2 RENAME COLUMN A TO A_r4135;
|
||||
REINDEX T;
|
||||
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