MDEV-14515 ifnull result depends on number of rows in joined table

Any expensive WHERE condition for a table-less query with
implicit aggregation was lost. As a result the used aggregate
functions were calculated over a non-empty set of rows even
in the case when the condition was false.
This commit is contained in:
Igor Babaev 2018-04-16 16:59:19 -07:00
commit 5e61e1716e
3 changed files with 46 additions and 2 deletions

View file

@ -5903,5 +5903,6 @@ bool JOIN::choose_tableless_subquery_plan()
tmp_having= having;
}
}
exec_const_cond= conds;
return FALSE;
}