diff options
author | Igor Babaev <igor@askmonty.org> | 2022-07-21 15:20:53 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2022-07-26 18:03:34 -0700 |
commit | bd935a41060199a17019453d6e187e8edd7929ba (patch) | |
tree | dea103f55d67e2649293a6137367b6cb83888dc4 /storage/connect/tabpivot.cpp | |
parent | e8eb6d9c936bab05b6058a329f9770840e6e3cff (diff) | |
download | mariadb-git-bd935a41060199a17019453d6e187e8edd7929ba.tar.gz |
MDEV-29139 Crash when using ANY predicand with redundant subquery in GROUP BY clause
This bug could cause a crash of the server when executing queries containing
ANY/ALL predicands with redundant subqueries in GROUP BY clauses.
These subqueries are eliminated by remove_redundant_subquery_clause()
together with elimination of GROUP BY list containing these subqueries.
However the references to the elements of the GROUP BY remained in the
JOIN::all_fields list of the right operand of of the ALL/ANY predicand.
Later these references confused make_aggr_tables_info() when forming
proper execution structures after ALL/ANY predicands had been replaced
with expressions containing MIN/MAX set functions.
The patch just removes these references from JOIN::all_fields list used
by the subquery of the ALL/ANY predicand when its GROUP BY clause is
eliminated.
Approved by Oleksandr Byelkin <sanja@mariadb.com>
Diffstat (limited to 'storage/connect/tabpivot.cpp')
0 files changed, 0 insertions, 0 deletions