Post-review fix for bug #14927.

This commit is contained in:
igor@rurik.mysql.com 2006-02-02 20:37:58 -08:00
parent cc2fae5244
commit 4abab51c24

View file

@ -504,6 +504,12 @@ JOIN::optimize()
{
Item::cond_result having_value;
having= optimize_cond(thd, having, &having_value);
if (thd->net.report_error)
{
error= 1;
DBUG_PRINT("error",("Error from optimize_cond"));
DBUG_RETURN(1);
}
if (cond_value == Item::COND_FALSE || having_value == Item::COND_FALSE ||
(!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS)))