mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-22191: Range access is not picked when index_merge_sort_union is turned off
When index_merge_sort_union is turned off only ror scans were considered for range scans, which is wrong. To fix the problem ensure both ror scans and non ror scans are considered for range access
This commit is contained in:
@ -1718,3 +1718,17 @@ where (key1varchar='value1' AND (key2int <=1 OR key2int > 1));
|
||||
--echo # The following must show col1=12345 for all rows:
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22191: Range access is not picked when index_merge_sort_union is turned off
|
||||
--echo #
|
||||
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
set @save_optimizer_switch="index_merge_sort_union=OFF";
|
||||
CREATE TABLE t1 (a INT, INDEX(a));
|
||||
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
explain
|
||||
SELECT * FROM t1 WHERE a > 5;
|
||||
SELECT * FROM t1 WHERE a > 5;
|
||||
set @@optimizer_switch=@save_optimizer_switch;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user