[MDEV-31484] Typo in SEL_ARG::number_of_eq_groups Created: 2023-06-15  Updated: 2023-06-30  Resolved: 2023-06-30

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 11.1
Fix Version/s: 11.0.3, 11.1.2

Type: Bug Priority: Minor
Reporter: Yury Chaikou Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None


 Description   

sql/opt_range.cc
SEL_ARG::number_of_eq_groups()

    if ((cur->min_flag | cur->min_flag) &
        (NO_MIN_RANGE | NO_MAX_RANGE | NEAR_MIN | NEAR_MAX | GEOM_FLAG))
      return -1;

Probably should be cur->min_flag | cur->max_flag



 Comments   
Comment by Michael Widenius [ 2023-06-30 ]

commit f25a74c0b094f23e1600ed9499a81420cfab663b
Author: Monty <monty@mariadb.org>
Date: Sun Jun 18 12:11:18 2023 +0300

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

Comment by Michael Widenius [ 2023-06-30 ]

Already fixed

Generated at Thu Feb 08 10:24:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.