Commit 8909586f authored by Alexander Nozdrin's avatar Alexander Nozdrin

Rename select_send::abort() to select_send::abort_result_set()

to be more descriptive.
parent c6a34a99
...@@ -1741,9 +1741,9 @@ bool select_send::send_result_set_metadata(List<Item> &list, uint flags) ...@@ -1741,9 +1741,9 @@ bool select_send::send_result_set_metadata(List<Item> &list, uint flags)
return res; return res;
} }
void select_send::abort() void select_send::abort_result_set()
{ {
DBUG_ENTER("select_send::abort"); DBUG_ENTER("select_send::abort_result_set");
if (is_result_set_started && thd->spcont) if (is_result_set_started && thd->spcont)
{ {
......
...@@ -2991,7 +2991,7 @@ class select_result :public Sql_alloc { ...@@ -2991,7 +2991,7 @@ class select_result :public Sql_alloc {
@retval TRUE error, an error message is set @retval TRUE error, an error message is set
*/ */
virtual bool check_simple_select() const; virtual bool check_simple_select() const;
virtual void abort() {} virtual void abort_result_set() {}
/* /*
Cleanup instance of this class for next execution of a prepared Cleanup instance of this class for next execution of a prepared
statement/stored procedure. statement/stored procedure.
...@@ -3034,7 +3034,7 @@ class select_send :public select_result { ...@@ -3034,7 +3034,7 @@ class select_send :public select_result {
bool send_data(List<Item> &items); bool send_data(List<Item> &items);
bool send_eof(); bool send_eof();
virtual bool check_simple_select() const { return FALSE; } virtual bool check_simple_select() const { return FALSE; }
void abort(); void abort_result_set();
virtual void cleanup(); virtual void cleanup();
}; };
...@@ -3126,7 +3126,7 @@ class select_insert :public select_result_interceptor { ...@@ -3126,7 +3126,7 @@ class select_insert :public select_result_interceptor {
virtual bool can_rollback_data() { return 0; } virtual bool can_rollback_data() { return 0; }
void send_error(uint errcode,const char *err); void send_error(uint errcode,const char *err);
bool send_eof(); bool send_eof();
void abort(); virtual void abort_result_set();
/* not implemented: select_insert is never re-used in prepared statements */ /* not implemented: select_insert is never re-used in prepared statements */
void cleanup(); void cleanup();
}; };
...@@ -3162,7 +3162,7 @@ class select_create: public select_insert { ...@@ -3162,7 +3162,7 @@ class select_create: public select_insert {
void store_values(List<Item> &values); void store_values(List<Item> &values);
void send_error(uint errcode,const char *err); void send_error(uint errcode,const char *err);
bool send_eof(); bool send_eof();
void abort(); virtual void abort_result_set();
virtual bool can_rollback_data() { return 1; } virtual bool can_rollback_data() { return 1; }
// Needed for access from local class MY_HOOKS in prepare(), since thd is proteted. // Needed for access from local class MY_HOOKS in prepare(), since thd is proteted.
...@@ -3496,7 +3496,7 @@ class multi_delete :public select_result_interceptor ...@@ -3496,7 +3496,7 @@ class multi_delete :public select_result_interceptor
{ {
return deleted; return deleted;
} }
virtual void abort(); virtual void abort_result_set();
}; };
...@@ -3547,7 +3547,7 @@ class multi_update :public select_result_interceptor ...@@ -3547,7 +3547,7 @@ class multi_update :public select_result_interceptor
{ {
return updated; return updated;
} }
virtual void abort(); virtual void abort_result_set();
}; };
class my_var : public Sql_alloc { class my_var : public Sql_alloc {
......
...@@ -770,9 +770,9 @@ void multi_delete::send_error(uint errcode,const char *err) ...@@ -770,9 +770,9 @@ void multi_delete::send_error(uint errcode,const char *err)
} }
void multi_delete::abort() void multi_delete::abort_result_set()
{ {
DBUG_ENTER("multi_delete::abort"); DBUG_ENTER("multi_delete::abort_result_set");
/* the error was handled or nothing deleted and no side effects return */ /* the error was handled or nothing deleted and no side effects return */
if (error_handled || if (error_handled ||
......
...@@ -3413,9 +3413,9 @@ bool select_insert::send_eof() ...@@ -3413,9 +3413,9 @@ bool select_insert::send_eof()
DBUG_RETURN(0); DBUG_RETURN(0);
} }
void select_insert::abort() { void select_insert::abort_result_set() {
DBUG_ENTER("select_insert::abort"); DBUG_ENTER("select_insert::abort_result_set");
/* /*
If the creation of the table failed (due to a syntax error, for If the creation of the table failed (due to a syntax error, for
example), no table will have been opened and therefore 'table' example), no table will have been opened and therefore 'table'
...@@ -3952,9 +3952,9 @@ bool select_create::send_eof() ...@@ -3952,9 +3952,9 @@ bool select_create::send_eof()
} }
void select_create::abort() void select_create::abort_result_set()
{ {
DBUG_ENTER("select_create::abort"); DBUG_ENTER("select_create::abort_result_set");
/* /*
In select_insert::abort() we roll back the statement, including In select_insert::abort() we roll back the statement, including
...@@ -3972,7 +3972,7 @@ void select_create::abort() ...@@ -3972,7 +3972,7 @@ void select_create::abort()
log state. log state.
*/ */
tmp_disable_binlog(thd); tmp_disable_binlog(thd);
select_insert::abort(); select_insert::abort_result_set();
thd->transaction.stmt.modified_non_trans_table= FALSE; thd->transaction.stmt.modified_non_trans_table= FALSE;
reenable_binlog(thd); reenable_binlog(thd);
/* possible error of writing binary log is ignored deliberately */ /* possible error of writing binary log is ignored deliberately */
......
...@@ -3401,7 +3401,7 @@ case SQLCOM_PREPARE: ...@@ -3401,7 +3401,7 @@ case SQLCOM_PREPARE:
res|= thd->is_error(); res|= thd->is_error();
MYSQL_MULTI_DELETE_DONE(res, del_result->num_deleted()); MYSQL_MULTI_DELETE_DONE(res, del_result->num_deleted());
if (res) if (res)
del_result->abort(); del_result->abort_result_set();
delete del_result; delete del_result;
} }
else else
...@@ -4858,7 +4858,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) ...@@ -4858,7 +4858,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
ER_YES, str.ptr()); ER_YES, str.ptr());
} }
if (res) if (res)
result->abort(); result->abort_result_set();
else else
result->send_eof(); result->send_eof();
delete result; delete result;
......
...@@ -300,7 +300,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result, ...@@ -300,7 +300,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
thd->is_error())); thd->is_error()));
res|= thd->is_error(); res|= thd->is_error();
if (unlikely(res)) if (unlikely(res))
result->abort(); result->abort_result_set();
MYSQL_SELECT_DONE((int) res, (ulong) thd->limit_found_rows); MYSQL_SELECT_DONE((int) res, (ulong) thd->limit_found_rows);
DBUG_RETURN(res); DBUG_RETURN(res);
......
...@@ -1261,7 +1261,7 @@ bool mysql_multi_update(THD *thd, ...@@ -1261,7 +1261,7 @@ bool mysql_multi_update(THD *thd,
{ {
/* If we had a another error reported earlier then this will be ignored */ /* If we had a another error reported earlier then this will be ignored */
(*result)->send_error(ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR)); (*result)->send_error(ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR));
(*result)->abort(); (*result)->abort_result_set();
} }
thd->abort_on_warning= 0; thd->abort_on_warning= 0;
DBUG_RETURN(res); DBUG_RETURN(res);
...@@ -1861,7 +1861,7 @@ void multi_update::send_error(uint errcode,const char *err) ...@@ -1861,7 +1861,7 @@ void multi_update::send_error(uint errcode,const char *err)
} }
void multi_update::abort() void multi_update::abort_result_set()
{ {
/* the error was handled or nothing deleted and no side effects return */ /* the error was handled or nothing deleted and no side effects return */
if (error_handled || if (error_handled ||
......
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