Files
ast-project/part1/results/3/bug_4c8b5ecf-4578-4ec5-98b7-6e13261f1add_logic.md
T
2026-06-24 13:47:14 +02:00

54 lines
1.0 KiB
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
CREATE TABLE t1(a TEXT COLLATE BINARY);
ALTER TABLE t1 ADD COLUMN b INTEGER COLLATE NOCASE;
INSERT INTO t1 VALUES(x'c714fadb5d678c9f65d584f7a42a737d','-2');
INSERT INTO t1 VALUES(instr('hello', 'lo'),'5.4e-08');
SELECT typeof(a), a, typeof(b), b FROM t1;
CREATE TABLE t2(a INTEGER);
INSERT INTO t2 VALUES(1);
INSERT INTO t2 VALUES(1);
INSERT INTO t2 VALUES(2);
ALTER TABLE t2 ADD COLUMN b INTEGER DEFAULT 9;
SELECT a, sum(b) FROM t2 GROUP BY a;
PRAGMA parser_trace = FALSE;
SELECT LAG(a, 2, a) OVER (PARTITION BY a ORDER BY a ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM t2;
INSERT INTO t1 DEFAULT VALUES;
```
## Actual output
```sql
blob|ÇúÛ]gŒŸ„÷¤*s}|integer|-2
text|4|real|5.4e-08
1|18
2|9
1
1
2
```
## Expectation
```sql
blob|Ç^TúÛ]gŒŸ„÷¤*s}|integer|-2
text|4|real|5.4e-08
1|18
2|9
1
1
2
```
## Flag
```
```