Files
ast-project/part1/results/2/bug_36e3a6a6-e23f-4a90-8839-437c2a8a09c5_unexpected_error.md
T
2026-06-24 13:47:14 +02:00

3.3 KiB

Summary

**No review yet**

Minimized query

PRAGMA recursive_triggers = TRUE;
.stats vmstep
BEGIN IMMEDIATE TRANSACTION;
BEGIN EXCLUSIVE;
CREATE TABLE t1(x);
CREATE TABLE t2(c);
CREATE TRIGGER r1 AFTER INSERT ON t2 BEGIN UPDATE t2 SET (c)=( EXISTS(SELECT ltrim(NULL) WHERE (WITH cte1(a) AS (SELECT -json(min(7382508571772158678)) FROM t1 WHERE (SELECT 1 WHERE (WITH cte2(b) AS (VALUES(1))SELECT b FROM cte2)))SELECT a FROM cte1)) ); END;
ALTER TABLE t2 RENAME TO t3;
SELECT name FROM sqlite_schema WHERE sql LIKE '%t2%';
SELECT name FROM sqlite_schema WHERE sql LIKE '%t3%' ORDER BY name;

END;
WITH RECURSIVE self(x) AS (SELECT 1 UNION ALL SELECT x FROM self) SELECT * FROM self LIMIT 5;
COMMIT;
UPDATE t1 SET x = CURRENT_TIMESTAMP WHERE 1;
INSERT INTO t2 VALUES (NULL) ON CONFLICT(c) DO UPDATE SET c = excluded.c;
SELECT * FROM t2 AS a LEFT OUTER JOIN t1 AS b ON a.rowid = b.rowid;

Actual output

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


Flag

-help