Files
ast-project/part1/results/3/bug_a57a4928-6ff6-4c2a-8517-36f18612ac48_logic.md
2026-06-24 13:47:14 +02:00

43 lines
933 B
Markdown

## 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
BEGIN EXCLUSIVE;
PRAGMA trusted_schema;
PRAGMA writable_schema = 1;
PRAGMA read_uncommitted = ON;
.import corrupt001.db main
CREATE TABLE t1(a INTEGER PRIMARY KEY,R);
CREATE TABLE t2(x UNIQUE);
CREATE VIEW v1a(z,y) AS SELECT x IS NULL, x FROM t2;
SELECT a,(+a)b,(+a)b,(+a)b,NOT EXISTS(SELECT null FROM t2),CASE z WHEN 487 THEN 992 WHEN 391 THEN 203 WHEN 10 THEN '?k<D Q' END,'' FROM t1 LEFT JOIN v1a ON z=b;
INSERT INTO t1 SELECT * FROM t1;
END;
PRAGMA trusted_schema = YES;
INSERT INTO t2 DEFAULT VALUES;
WITH a AS (SELECT * FROM t1), b AS (SELECT * FROM a) SELECT * FROM b;
SELECT * FROM t2 WHERE x IN (SELECT x FROM t2 t2 WHERE t2.x = t2.x);
```
## Actual output
```sql
1
```
## Expectation
```sql
0
```
## Flag
```
```