1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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.


mysql-test/r/group_min_max.result:
  Added a test case for bug #16203.
mysql-test/t/group_min_max.test:
  Added a test case for bug #16203.
This commit is contained in:
unknown
2006-02-06 11:35:13 -08:00
parent 26a81f6fb1
commit d8c96f286f
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)