110 lines
1.8 KiB
Markdown
110 lines
1.8 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 recursive_triggers = NO;
|
|
PRAGMA count_changes = ON;
|
|
PRAGMA cache_spill = YES;
|
|
.dbconfig
|
|
CREATE TABLE t1(a,b);
|
|
INSERT INTO t1 VALUES(1,11);
|
|
INSERT INTO t1 VALUES(2,22);
|
|
INSERT INTO t1 SELECT a+2, b+22 FROM t1;
|
|
INSERT INTO t1 SELECT a+4, b+44 FROM t1;
|
|
CREATE TABLE t2(c,d);
|
|
INSERT INTO t2 SELECT a, 900+b FROM t1;
|
|
PRAGMA automatic_index=ON;
|
|
SELECT b, d FROM t1 JOIN t2 ON a=c ORDER BY b;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_t1_8154 ON t1(a COLLATE NOCASE) WHERE a > 0;
|
|
DELETE FROM t2 WHERE c IS NULL;
|
|
ALTER TABLE t1 RENAME COLUMN b TO b_r305;
|
|
INSERT OR REPLACE INTO t2 VALUES (NULL, 0);
|
|
```
|
|
|
|
## Actual output
|
|
|
|
```sql
|
|
defensive off
|
|
dqs_ddl on
|
|
dqs_dml on
|
|
enable_fkey off
|
|
enable_qpsg off
|
|
enable_trigger on
|
|
enable_view on
|
|
fts3_tokenizer off
|
|
legacy_alter_table off
|
|
legacy_file_format off
|
|
load_extension on
|
|
no_ckpt_on_close off
|
|
reset_database off
|
|
trigger_eqp off
|
|
trusted_schema on
|
|
writable_schema off
|
|
1
|
|
1
|
|
2
|
|
4
|
|
8
|
|
11|911
|
|
22|922
|
|
33|933
|
|
44|944
|
|
55|955
|
|
66|966
|
|
77|977
|
|
88|988
|
|
0
|
|
1
|
|
```
|
|
|
|
## Expectation
|
|
|
|
```sql
|
|
attach_create on
|
|
attach_write on
|
|
comments on
|
|
defensive on
|
|
dqs_ddl off
|
|
dqs_dml off
|
|
enable_fkey off
|
|
enable_qpsg off
|
|
enable_trigger on
|
|
enable_view on
|
|
fts3_tokenizer off
|
|
legacy_alter_table off
|
|
legacy_file_format off
|
|
load_extension on
|
|
no_ckpt_on_close off
|
|
reset_database off
|
|
reverse_scanorder off
|
|
stmt_scanstatus off
|
|
trigger_eqp off
|
|
trusted_schema off
|
|
writable_schema off
|
|
1
|
|
1
|
|
2
|
|
4
|
|
8
|
|
11|911
|
|
22|922
|
|
33|933
|
|
44|944
|
|
55|955
|
|
66|966
|
|
77|977
|
|
88|988
|
|
0
|
|
1
|
|
```
|
|
|
|
## Flag
|
|
|
|
```
|
|
|
|
```
|
|
|