70 lines
1.2 KiB
Markdown
70 lines
1.2 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).-->
|
|
It seems that the patched version does not support json. It is a logic bug because the output is different
|
|
|
|
## Minimized query
|
|
|
|
```sql
|
|
CREATE TABLE T1 (
|
|
A VARCHAR(20),
|
|
X VARCHAR(10),
|
|
PRIMARY KEY (A, X),
|
|
UNIQUE (X)
|
|
);
|
|
CREATE TABLE T2 (
|
|
A VARCHAR(20),
|
|
Y VARCHAR(10) UNIQUE,
|
|
PRIMARY KEY (A, Y)
|
|
);
|
|
INSERT INTO T1 VALUES ('a', 'm');
|
|
INSERT INTO T1 VALUES ('b', 'n');
|
|
INSERT INTO T2 VALUES ('b', 'k');
|
|
SELECT A FROM T1 UNION ALL SELECT A FROM T2 ORDER BY A;
|
|
PRAGMA trusted_schema = TRUE;
|
|
CREATE VIRTUAL TABLE t0 USING fts4("x", "y", "z");
|
|
CREATE TABLE T (
|
|
a INTEGER,
|
|
b REAL
|
|
);
|
|
INSERT INTO T VALUES (concat(json_type(1, '$'), 2, 3),1.5), (2,-2.5), (3,0.0);
|
|
CREATE INDEX c
|
|
ON T(b);
|
|
SELECT * FROM T WHERE b >= -2.5 OR b < 2.0;
|
|
DROP TABLE t0;
|
|
INSERT INTO T DEFAULT VALUES;
|
|
PRAGMA full_column_names = TRUE;
|
|
WITH cte AS (SELECT * FROM T WHERE b = (SELECT MAX(b) FROM T)) SELECT * FROM cte;
|
|
PRAGMA recursive_triggers = ON;
|
|
|
|
SELECT COUNT(*) FROM T;
|
|
```
|
|
|
|
## Actual output
|
|
|
|
```sql
|
|
a
|
|
b
|
|
b
|
|
1
|
|
```
|
|
|
|
## Expectation
|
|
|
|
```sql
|
|
a
|
|
b
|
|
b
|
|
2|-2.5
|
|
3|0.0
|
|
integer23|1.5
|
|
integer23|1.5
|
|
4
|
|
```
|
|
|
|
## Flag
|
|
|
|
```
|
|
|
|
```
|
|
|