Use thd->is_error() instead of direct access to thd->net.report_error
in evaluate_join_record(). A minor cleanup required for the fix for Bug#12713.
This commit is contained in:
parent
f60b890967
commit
6bd9f5c1cb
@ -122,7 +122,7 @@ static int do_select(JOIN *join,List<Item> *fields,TABLE *tmp_table,
|
||||
|
||||
static enum_nested_loop_state
|
||||
evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
|
||||
int error, my_bool *report_error);
|
||||
int error);
|
||||
static enum_nested_loop_state
|
||||
evaluate_null_complemented_join_record(JOIN *join, JOIN_TAB *join_tab);
|
||||
static enum_nested_loop_state
|
||||
@ -10871,7 +10871,6 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
|
||||
|
||||
int error;
|
||||
enum_nested_loop_state rc;
|
||||
my_bool *report_error= &(join->thd->net.report_error);
|
||||
READ_RECORD *info= &join_tab->read_record;
|
||||
|
||||
if (join->resume_nested_loop)
|
||||
@ -10903,13 +10902,13 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
|
||||
join->thd->row_count= 0;
|
||||
|
||||
error= (*join_tab->read_first_record)(join_tab);
|
||||
rc= evaluate_join_record(join, join_tab, error, report_error);
|
||||
rc= evaluate_join_record(join, join_tab, error);
|
||||
}
|
||||
|
||||
while (rc == NESTED_LOOP_OK)
|
||||
{
|
||||
error= info->read_record(info);
|
||||
rc= evaluate_join_record(join, join_tab, error, report_error);
|
||||
rc= evaluate_join_record(join, join_tab, error);
|
||||
}
|
||||
|
||||
if (rc == NESTED_LOOP_NO_MORE_ROWS &&
|
||||
@ -10933,13 +10932,13 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
|
||||
|
||||
static enum_nested_loop_state
|
||||
evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
|
||||
int error, my_bool *report_error)
|
||||
int error)
|
||||
{
|
||||
bool not_used_in_distinct=join_tab->not_used_in_distinct;
|
||||
ha_rows found_records=join->found_records;
|
||||
COND *select_cond= join_tab->select_cond;
|
||||
|
||||
if (error > 0 || (*report_error)) // Fatal error
|
||||
if (error > 0 || (join->thd->is_error())) // Fatal error
|
||||
return NESTED_LOOP_ERROR;
|
||||
if (error < 0)
|
||||
return NESTED_LOOP_NO_MORE_ROWS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user