1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
If check_quick_select returns non-empty range then the function cost_group_min_max
cannot return 0 as an estimate of the number of retrieved records.
Yet the function erroneously returned 0 as the estimate in some situations.
This commit is contained in:
igor@rurik.mysql.com
2006-02-06 11:35:13 -08:00
parent 4df873e547
commit 3af0eabc7f
3 changed files with 49 additions and 0 deletions

View File

@@ -7780,6 +7780,7 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts,
quick_prefix_selectivity= (double) quick_prefix_records /
(double) table_records;
num_groups= (uint) rint(num_groups * quick_prefix_selectivity);
set_if_bigger(num_groups, 1);
}
if (used_key_parts > group_key_parts)