mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-21932 A fast plan with ROR index-merge is ignored when
'index_merge_sort_union=off' When index_merge_sort_union is set to 'off' and index_merge_union is set to 'on' then any evaluated index merge scan must consist only of ROR scans. The cheapest out of such index merges must be chosen. This index merge might not be the cheapest index merge.
This commit is contained in:
@ -7386,6 +7386,9 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
|
||||
found_records= check_quick_select(param, idx, read_index_only, key,
|
||||
update_tbl_stats, &mrr_flags,
|
||||
&buf_size, &cost, &is_ror_scan);
|
||||
if (!is_ror_scan &&
|
||||
!optimizer_flag(param->thd, OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION))
|
||||
continue;
|
||||
|
||||
if (found_records != HA_POS_ERROR && tree->index_scans &&
|
||||
(index_scan= (INDEX_SCAN_INFO *)alloc_root(param->mem_root,
|
||||
|
Reference in New Issue
Block a user