This commit is contained in:
2026-06-24 13:47:14 +02:00
commit fd930e15cb
2377 changed files with 1213931 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
## 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).-->
We think the "INTERSECT SELECT" statement is the issue. It is a logic bug because the output is different
## Minimized query
```sql
.once log.txt
PRAGMA parser_trace = OFF;
PRAGMA wal_checkpoint('RESTART');
PRAGMA trusted_schema;
.imposter off
CREATE TABLE T1 (
A VARCHAR(20) 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;
ALTER TABLE T2 ADD COLUMN extra_8207 CHAR(10);
```
## Actual output
```sql
0|-1|-1
1
b
c
```
## Expectation
```sql
0|-1|-1
0
b
c
```
## Flag
```
```