Files
ast-project/part1/bug-reproducers/9/README.md
T
2026-06-24 13:47:14 +02:00

51 lines
848 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).-->
We beliebe "timediff" causes the bug. It is a logic bug because the output is different
## Minimized query
```sql
CREATE TABLE t1(a, b);
CREATE /* CHAR(10) */ INDEX i1 ON t1(a);
INSERT INTO t1 VALUES('aaa', tanh(timediff(sign(0), 1)));
INSERT INTO t1 VALUES('ddd', 2);
INSERT INTO t1 VALUES('ccc', 3);
INSERT INTO t1 VALUES('eee', 4);
SELECT b FROM t1 WHERE a IN ('aaa', 'bbb', 'ccc');
SELECT a FROM t1 WHERE rowid IN (1, 3);
ALTER TABLE t1 DROP COLUMN b;
CREATE INDEX IF NOT EXISTS idx_t1_9614 ON t1(a COLLATE NOCASE) WHERE a IS NOT NULL;
SELECT * FROM t1;
```
## Actual output
```sql
3
ddd
eee
ddd
ccc
eee
```
## Expectation
```sql
3
aaa
ccc
aaa
ddd
ccc
eee
```
## Flag
```
```