mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -2144,3 +2144,22 @@ value1 1000685 12345
|
||||
value1 1003560 12345
|
||||
value1 1004807 12345
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-22191: Range access is not picked when index_merge_sort_union is turned off
|
||||
#
|
||||
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;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 5;
|
||||
a
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
set @@optimizer_switch=@save_optimizer_switch;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user