mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Disable the OP_SeekScan opcode of the in-scan-vs-index optimization when
in PRAGMA reverse_unordered_selects mode, as the OP_SeekScan only works with forwards scans. Thanks to OSSFuzz for pointing out the problem to us. FossilOrigin-Name: c75c3a3b756635bfdab44e4b56a337e4a88af3a8803cd3e9a67abf3d0d3450dc
This commit is contained in:
@ -170,5 +170,20 @@ do_execsql_test whereA-5.1 {
|
||||
SELECT a FROM t1 WHERE b=-99 OR b>1;
|
||||
} {1}
|
||||
|
||||
# 2020-10-02 OSSFuzz find for an issue introduced by a check-in
|
||||
# on the previous day.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test whereA-6.1 {
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE INDEX t1aa ON t1(a,a);
|
||||
INSERT INTO t1 VALUES(1,2);
|
||||
ANALYZE;
|
||||
UPDATE sqlite_stat1 SET stat='27 3 3' WHERE idx='t1aa';
|
||||
ANALYZE sqlite_schema;
|
||||
PRAGMA reverse_unordered_selects (1) ;
|
||||
SELECT a FROM t1 WHERE a=1 OR a=2;
|
||||
} {1}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user