1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixed explain error handling

This commit is contained in:
bell@sanja.is.com.ua
2002-11-18 22:19:15 +02:00
parent c0764205cf
commit 4e45cc7a9e
3 changed files with 14 additions and 7 deletions

View File

@@ -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);
}