Fixed the bug mdev-12788.
In some rare cases queries with UNION ALL using a derived table specified by a grouping select with a subquery in WHERE and impossible HAVING detected after constant row substitution could hang. The cause was not a proper return from the function subselect_single_select_engine::exec() in the case when the subquery was not optimized beforehand and the optimization performed in this function requested for a change of the subquery engine. This was fixed. Also a change was applied that avoided execution of a subquery if impossible having was detected for the main query at the optimization stage.
Showing
Please register or sign in to comment