mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
repetable test replaced with inline function
This commit is contained in:
@ -1122,9 +1122,7 @@ JOIN::exec()
|
|||||||
if (zero_result_cause)
|
if (zero_result_cause)
|
||||||
{
|
{
|
||||||
(void) return_zero_rows(this, result, tables_list, fields_list,
|
(void) return_zero_rows(this, result, tables_list, fields_list,
|
||||||
do_send_rows &&
|
send_row_on_empty_set(),
|
||||||
tmp_table_param.sum_func_count != 0 &&
|
|
||||||
!group_list,
|
|
||||||
select_options,
|
select_options,
|
||||||
zero_result_cause,
|
zero_result_cause,
|
||||||
having, procedure,
|
having, procedure,
|
||||||
@ -5674,8 +5672,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
|
|||||||
if (!(error=(*end_select)(join,join_tab,0)) || error == -3)
|
if (!(error=(*end_select)(join,join_tab,0)) || error == -3)
|
||||||
error=(*end_select)(join,join_tab,1);
|
error=(*end_select)(join,join_tab,1);
|
||||||
}
|
}
|
||||||
else if (join->do_send_rows && join->tmp_table_param.sum_func_count != 0 &&
|
else if (join->send_row_on_empty_set())
|
||||||
!join->group_list)
|
|
||||||
error= join->result->send_data(*join->fields);
|
error= join->result->send_data(*join->fields);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -299,6 +299,11 @@ class JOIN :public Sql_alloc
|
|||||||
void join_free(bool full);
|
void join_free(bool full);
|
||||||
void clear();
|
void clear();
|
||||||
bool save_join_tab();
|
bool save_join_tab();
|
||||||
|
bool send_row_on_empty_set()
|
||||||
|
{
|
||||||
|
return (do_send_rows && tmp_table_param.sum_func_count != 0 &&
|
||||||
|
!group_list);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user