mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18553: MDEV-16327 pre-requisits part 3: move kill check in one place
Kill check moved from send_data() methids in its wrapper: send_data_with_check().
This commit is contained in:
@ -103,9 +103,6 @@ bool Pushdown_select::send_data()
|
||||
Protocol *protocol= thd->protocol;
|
||||
DBUG_ENTER("Pushdown_select::send_data");
|
||||
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
DBUG_RETURN(false);
|
||||
|
||||
protocol->prepare_for_resend();
|
||||
if (protocol->send_result_set_row(&result_columns))
|
||||
{
|
||||
|
@ -3015,9 +3015,6 @@ int select_send::send_data(List<Item> &items)
|
||||
Protocol *protocol= thd->protocol;
|
||||
DBUG_ENTER("select_send::send_data");
|
||||
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
protocol->prepare_for_resend();
|
||||
if (protocol->send_result_set_row(&items))
|
||||
{
|
||||
@ -3279,8 +3276,6 @@ int select_export::send_data(List<Item> &items)
|
||||
String tmp(buff,sizeof(buff),&my_charset_bin),*res;
|
||||
tmp.length(0);
|
||||
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
DBUG_RETURN(0);
|
||||
row_count++;
|
||||
Item *item;
|
||||
uint used_length=0,items_left=items.elements;
|
||||
@ -3534,9 +3529,6 @@ int select_dump::send_data(List<Item> &items)
|
||||
Item *item;
|
||||
DBUG_ENTER("select_dump::send_data");
|
||||
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
DBUG_RETURN(0);
|
||||
|
||||
if (row_count++ > 1)
|
||||
{
|
||||
my_message(ER_TOO_MANY_ROWS, ER_THD(thd, ER_TOO_MANY_ROWS), MYF(0));
|
||||
@ -3572,8 +3564,6 @@ int select_singlerow_subselect::send_data(List<Item> &items)
|
||||
MYF(current_thd->lex->ignore ? ME_WARNING : 0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
DBUG_RETURN(0);
|
||||
List_iterator_fast<Item> li(items);
|
||||
Item *val_item;
|
||||
for (uint i= 0; (val_item= li++); i++)
|
||||
@ -3708,8 +3698,6 @@ int select_exists_subselect::send_data(List<Item> &items)
|
||||
{
|
||||
DBUG_ENTER("select_exists_subselect::send_data");
|
||||
Item_exists_subselect *it= (Item_exists_subselect *)item;
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
DBUG_RETURN(0);
|
||||
it->value= 1;
|
||||
it->assigned(1);
|
||||
DBUG_RETURN(0);
|
||||
|
@ -5101,6 +5101,10 @@ public:
|
||||
{
|
||||
if (u->lim.check_offset(sent))
|
||||
return 0;
|
||||
|
||||
if (u->thd->killed == ABORT_QUERY)
|
||||
return 0;
|
||||
|
||||
return send_data(items);
|
||||
}
|
||||
/*
|
||||
|
@ -3857,9 +3857,6 @@ int select_insert::send_data(List<Item> &values)
|
||||
DBUG_ENTER("select_insert::send_data");
|
||||
bool error=0;
|
||||
|
||||
if (unlikely(thd->killed == ABORT_QUERY))
|
||||
DBUG_RETURN(0);
|
||||
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
|
||||
store_values(values);
|
||||
if (table->default_field &&
|
||||
|
@ -111,8 +111,7 @@ int select_unit::send_data(List<Item> &values)
|
||||
{
|
||||
int rc= 0;
|
||||
int not_reported_error= 0;
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
return 0;
|
||||
|
||||
if (table->no_rows_with_nulls)
|
||||
table->null_catch_flags= CHECK_ROW_FOR_NULLS_TO_REJECT;
|
||||
|
||||
@ -602,8 +601,7 @@ int select_unit_ext::send_data(List<Item> &values)
|
||||
int rc= 0;
|
||||
int not_reported_error= 0;
|
||||
int find_res;
|
||||
if (thd->killed == ABORT_QUERY)
|
||||
return 0;
|
||||
|
||||
if (table->no_rows_with_nulls)
|
||||
table->null_catch_flags= CHECK_ROW_FOR_NULLS_TO_REJECT;
|
||||
|
||||
|
Reference in New Issue
Block a user