summaryrefslogtreecommitdiff
path: root/libmariadb
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2021-03-15 22:48:30 -0700
committerIgor Babaev <igor@askmonty.org>2021-03-18 09:54:49 -0700
commitb34bb81eaf0f1fd653f93257fbbdaa4c31ea8ea5 (patch)
tree16badf33f2771b857cda95016c0b879c544feb18 /libmariadb
parentc557e9540ab6058713a7c78dfa3df366ea92dd92 (diff)
downloadmariadb-git-b34bb81eaf0f1fd653f93257fbbdaa4c31ea8ea5.tar.gz
MDEV-25112 MIN/MAX aggregation over an indexed column may return wrong result
If a query with implicit grouping contains in MIN/MAX set function in the select list over a column that is a part of an index then the query might be subject to MIN/MAX optimization. With this optimization the server performs a look-up into an index, fetches a value of the column C used in the MIN/MAX function and substitute the MIN/MAX expression for this value. This allows to eliminate the table containing C from further join processing. In order the optimization to be applied the WHERE condition must be a conjunction of simple equality/inequality predicates or/and BETWEEN predicates. The bug fixed in the patch resulted in fetching a wrong value from the index used for MIN/MAX optimization. It may happened when a BETWEEN predicate containing the MIN/MAX value followed a strict inequality. Approved by dmitry.shulga@mariadb.com
Diffstat (limited to 'libmariadb')
0 files changed, 0 insertions, 0 deletions