Commit 962c228a authored by serg@serg.mylan's avatar serg@serg.mylan

select send_error cleanup (not everything is fixed)

parent 4a9defa3
...@@ -195,9 +195,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) ...@@ -195,9 +195,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
/* Don't set res if it's -1 as we may want this later */ /* Don't set res if it's -1 as we may want this later */
DBUG_PRINT("info",("res: %d report_error: %d", res, DBUG_PRINT("info",("res: %d report_error: %d", res,
thd->net.report_error)); thd->net.report_error));
if (thd->net.report_error) if (thd->net.report_error || res<0)
res= 1;
if (res)
{ {
result->send_error(0, NullS); result->send_error(0, NullS);
result->abort(); result->abort();
...@@ -1462,7 +1460,7 @@ JOIN::exec() ...@@ -1462,7 +1460,7 @@ JOIN::exec()
} }
curr_join->having= curr_join->tmp_having; curr_join->having= curr_join->tmp_having;
thd->proc_info="Sending data"; thd->proc_info="Sending data";
error= thd->net.report_error || error= thd->net.report_error ? -1 :
do_select(curr_join, curr_fields_list, NULL, procedure); do_select(curr_join, curr_fields_list, NULL, procedure);
thd->limit_found_rows= curr_join->send_records; thd->limit_found_rows= curr_join->send_records;
thd->examined_row_count= curr_join->examined_rows; thd->examined_row_count= curr_join->examined_rows;
...@@ -5684,7 +5682,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure) ...@@ -5684,7 +5682,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
DBUG_PRINT("error",("Error: do_select() failed")); DBUG_PRINT("error",("Error: do_select() failed"));
} }
#endif #endif
DBUG_RETURN(error || join->thd->net.report_error); DBUG_RETURN(join->thd->net.report_error ? -1 : error)
} }
......
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