84 lines
1.5 KiB
Markdown
84 lines
1.5 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
|
|
PRAGMA count_changes = YES;
|
|
PRAGMA index_list(users);
|
|
PRAGMA encoding;
|
|
.limit
|
|
CREATE TABLE t5(a INT, b INT);
|
|
CREATE UNIQUE INDEX t5x ON t5(a+b);
|
|
INSERT INTO t5(a,b) VALUES(0,0),(1,0),(1,1),(0,3);
|
|
CREATE TEMP TABLE out AS SELECT DISTINCT a+b FROM t5;
|
|
CREATE TABLE t6a(x INTEGER PRIMARY KEY);
|
|
INSERT INTO t6a VALUES(1);
|
|
CREATE TABLE t6b(y INTEGER PRIMARY KEY);
|
|
INSERT INTO t6b VALUES(2),(3);
|
|
SELECT DISTINCT x, x FROM t6a, t6b;
|
|
SELECT * FROM out ORDER BY 1;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_t5_5638 ON t5((b + 1)) WHERE b > 0;
|
|
DROP TABLE IF EXISTS t6b;
|
|
```
|
|
|
|
## Actual output
|
|
|
|
```sql
|
|
UTF-8
|
|
length 1000000000
|
|
sql_length 1000000000
|
|
column 2000
|
|
expr_depth 1000
|
|
compound_select 500
|
|
vdbe_op 250000000
|
|
function_arg 127
|
|
attached 10
|
|
like_pattern_length 50000
|
|
variable_number 32766
|
|
trigger_depth 1000
|
|
worker_threads 0
|
|
4
|
|
1
|
|
2
|
|
1|1
|
|
0
|
|
1
|
|
2
|
|
3
|
|
```
|
|
|
|
## Expectation
|
|
|
|
```sql
|
|
UTF-8
|
|
length 1000000000
|
|
sql_length 1000000000
|
|
column 2000
|
|
expr_depth 1000
|
|
compound_select 500
|
|
vdbe_op 250000000
|
|
function_arg 1000
|
|
attached 10
|
|
like_pattern_length 50000
|
|
variable_number 32766
|
|
trigger_depth 1000
|
|
worker_threads 0
|
|
4
|
|
1
|
|
2
|
|
1|1
|
|
0
|
|
1
|
|
2
|
|
3
|
|
```
|
|
|
|
## Flag
|
|
|
|
```
|
|
-nofollow
|
|
```
|
|
|