mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed explain error handling
mysql-test/r/subselect.result: test of subselect explain mysql-test/t/subselect.test: test of subselect explain
This commit is contained in:
@ -371,13 +371,17 @@ JOIN::optimize()
|
||||
}
|
||||
#endif
|
||||
|
||||
conds=optimize_cond(conds,&cond_value);
|
||||
if (thd->fatal_error || thd->net.report_error)
|
||||
conds= optimize_cond(conds,&cond_value);
|
||||
if (thd->fatal_error)
|
||||
{
|
||||
// quick abort
|
||||
delete procedure;
|
||||
error = 0;
|
||||
error= 0;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
} else if (thd->net.report_error)
|
||||
// normal error processing & cleanup
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
if (cond_value == Item::COND_FALSE || !unit->select_limit_cnt)
|
||||
{ /* Impossible cond */
|
||||
zero_result_cause= "Impossible WHERE";
|
||||
@ -7516,8 +7520,8 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
|
||||
break;
|
||||
|
||||
}
|
||||
if (res > 0)
|
||||
res= -res; // mysql_explain_select do not report error
|
||||
if (res > 0 || thd->net.report_error)
|
||||
res= -1; // mysql_explain_select do not report error
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user