Fix LP BUG#680846
Analysis: JOIN::optimize performs constant optimization of GROUP by clauses by calling remove_const(): group_list= remove_const(this, (old_group_list= group_list), conds, rollup.state == ROLLUP::STATE_NONE, &simple_group); If it turns out that a GROUP clause references a field that is computed by a single-row subquery, then the said optimization performs premature execution of the subquery referenced by the group clause. Solution: Block the evaluation of subqueries similarly to the approach for the WHERE and JOIN..ON clauses.
Showing
Please register or sign in to comment