1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed typo on opt_range.cc: SEL_ARG::number_of_eq_groups()

It could cause wrong range estimation for GROUP BY queries that are
using 'WHERE index_part >= constant'.
(The function was trying to check for 'index_part = constant')

Reporter: Yuty Chaikou
This commit is contained in:
Monty
2023-06-18 12:11:18 +03:00
parent 5fb2c031f7
commit f25a74c0b0
2 changed files with 4 additions and 4 deletions

View File

@@ -11177,7 +11177,7 @@ int SEL_ARG::number_of_eq_groups(uint group_key_parts) const
cur= first();
do
{
if ((cur->min_flag | cur->min_flag) &
if ((cur->min_flag | cur->max_flag) &
(NO_MIN_RANGE | NO_MAX_RANGE | NEAR_MIN | NEAR_MAX | GEOM_FLAG))
return -1;
if (min_value != max_value && !min_max_are_equal())