You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Item_rollup_sum_switcher::current_arg
Backport to 5.7.49.
Problem is seen when a subquery containing a aggregate
function with rollup is part of a row value comparator
and if there were no rows returned from the subquery.
cmp_item_row::store_value() evaluates the subquery and
goes ahead to store the values of the expressions in
the comparator without checking if the result was assigned
for the subquery. This leads to evaluation of a rollup
expression when it is marked as not to be evaluated as
aggregation was completed earlier. For the failing
query, AggregateIterator() does evaluate the expressions.
However HAVING clause does not qualify the rows. So the
result of the aggregation is never cached.
If a subquery returns empty result, bring_value()
would set the "null_value" to true.
cmp_item_row::store_value() now stores the value of
the underlying comparator objects only when the
result is not null. Else the result is set
to null.
Change-Id: I7bb17e621f1e5b439f6284c279ce69b80dace237
0 commit comments