Commit 4abab51c authored by igor@rurik.mysql.com's avatar igor@rurik.mysql.com

Post-review fix for bug #14927.

parent cc2fae52
...@@ -504,6 +504,12 @@ JOIN::optimize() ...@@ -504,6 +504,12 @@ JOIN::optimize()
{ {
Item::cond_result having_value; Item::cond_result having_value;
having= optimize_cond(thd, having, &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 || if (cond_value == Item::COND_FALSE || having_value == Item::COND_FALSE ||
(!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS))) (!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment