mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-5433 select_result::send_error() is unused
remove dead code
This commit is contained in:
parent
707dd6b9e9
commit
e29a4dd519
5 changed files with 4 additions and 88 deletions
|
@ -2439,12 +2439,6 @@ select_result::select_result()
|
|||
thd=current_thd;
|
||||
}
|
||||
|
||||
void select_result::send_error(uint errcode,const char *err)
|
||||
{
|
||||
my_message(errcode, err, MYF(0));
|
||||
}
|
||||
|
||||
|
||||
void select_result::cleanup()
|
||||
{
|
||||
/* do nothing */
|
||||
|
@ -2586,20 +2580,6 @@ bool select_send::send_eof()
|
|||
Handling writing to file
|
||||
************************************************************************/
|
||||
|
||||
void select_to_file::send_error(uint errcode,const char *err)
|
||||
{
|
||||
my_message(errcode, err, MYF(0));
|
||||
if (file > 0)
|
||||
{
|
||||
(void) end_io_cache(&cache);
|
||||
mysql_file_close(file, MYF(0));
|
||||
/* Delete file on error */
|
||||
mysql_file_delete(key_select_to_file, path, MYF(0));
|
||||
file= -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool select_to_file::send_eof()
|
||||
{
|
||||
int error= MY_TEST(end_io_cache(&cache));
|
||||
|
|
|
@ -3838,7 +3838,6 @@ public:
|
|||
{ return fields.elements; }
|
||||
virtual bool send_result_set_metadata(List<Item> &list, uint flags)=0;
|
||||
virtual bool initialize_tables (JOIN *join=0) { return 0; }
|
||||
virtual void send_error(uint errcode,const char *err);
|
||||
virtual bool send_eof()=0;
|
||||
/**
|
||||
Check if this query returns a result set and therefore is allowed in
|
||||
|
@ -3965,7 +3964,6 @@ public:
|
|||
select_to_file(sql_exchange *ex) :exchange(ex), file(-1),row_count(0L)
|
||||
{ path[0]=0; }
|
||||
~select_to_file();
|
||||
void send_error(uint errcode,const char *err);
|
||||
bool send_eof();
|
||||
void cleanup();
|
||||
};
|
||||
|
@ -4038,7 +4036,6 @@ class select_insert :public select_result_interceptor {
|
|||
virtual int send_data(List<Item> &items);
|
||||
virtual void store_values(List<Item> &values);
|
||||
virtual bool can_rollback_data() { return 0; }
|
||||
void send_error(uint errcode,const char *err);
|
||||
bool send_eof();
|
||||
virtual void abort_result_set();
|
||||
/* not implemented: select_insert is never re-used in prepared statements */
|
||||
|
@ -4076,7 +4073,6 @@ public:
|
|||
|
||||
int binlog_show_create_table(TABLE **tables, uint count);
|
||||
void store_values(List<Item> &values);
|
||||
void send_error(uint errcode,const char *err);
|
||||
bool send_eof();
|
||||
virtual void abort_result_set();
|
||||
virtual bool can_rollback_data() { return 1; }
|
||||
|
@ -4594,7 +4590,7 @@ class multi_delete :public select_result_interceptor
|
|||
bool delete_while_scanning;
|
||||
/*
|
||||
error handling (rollback and binlogging) can happen in send_eof()
|
||||
so that afterward send_error() needs to find out that.
|
||||
so that afterward abort_result_set() needs to find out that.
|
||||
*/
|
||||
bool error_handled;
|
||||
|
||||
|
@ -4604,7 +4600,6 @@ public:
|
|||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
bool initialize_tables (JOIN *join);
|
||||
void send_error(uint errcode,const char *err);
|
||||
int do_deletes();
|
||||
int do_table_deletes(TABLE *table, bool ignore);
|
||||
bool send_eof();
|
||||
|
@ -4640,7 +4635,7 @@ class multi_update :public select_result_interceptor
|
|||
bool ignore;
|
||||
/*
|
||||
error handling (rollback and binlogging) can happen in send_eof()
|
||||
so that afterward send_error() needs to find out that.
|
||||
so that afterward abort_result_set() needs to find out that.
|
||||
*/
|
||||
bool error_handled;
|
||||
|
||||
|
@ -4654,7 +4649,6 @@ public:
|
|||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
bool initialize_tables (JOIN *join);
|
||||
void send_error(uint errcode,const char *err);
|
||||
int do_updates();
|
||||
bool send_eof();
|
||||
inline ha_rows num_found()
|
||||
|
|
|
@ -1047,17 +1047,6 @@ int multi_delete::send_data(List<Item> &values)
|
|||
}
|
||||
|
||||
|
||||
void multi_delete::send_error(uint errcode,const char *err)
|
||||
{
|
||||
DBUG_ENTER("multi_delete::send_error");
|
||||
|
||||
/* First send error what ever it is ... */
|
||||
my_message(errcode, err, MYF(0));
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
void multi_delete::abort_result_set()
|
||||
{
|
||||
DBUG_ENTER("multi_delete::abort_result_set");
|
||||
|
@ -1292,7 +1281,7 @@ bool multi_delete::send_eof()
|
|||
}
|
||||
}
|
||||
if (local_error != 0)
|
||||
error_handled= TRUE; // to force early leave from ::send_error()
|
||||
error_handled= TRUE; // to force early leave from ::abort_result_set()
|
||||
|
||||
if (!local_error)
|
||||
{
|
||||
|
|
|
@ -3636,16 +3636,6 @@ void select_insert::store_values(List<Item> &values)
|
|||
TRG_EVENT_INSERT);
|
||||
}
|
||||
|
||||
void select_insert::send_error(uint errcode,const char *err)
|
||||
{
|
||||
DBUG_ENTER("select_insert::send_error");
|
||||
|
||||
my_message(errcode, err, MYF(0));
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
bool select_insert::send_eof()
|
||||
{
|
||||
int error;
|
||||
|
@ -4198,36 +4188,6 @@ void select_create::store_values(List<Item> &values)
|
|||
}
|
||||
|
||||
|
||||
void select_create::send_error(uint errcode,const char *err)
|
||||
{
|
||||
DBUG_ENTER("select_create::send_error");
|
||||
|
||||
DBUG_PRINT("info",
|
||||
("Current statement %s row-based",
|
||||
thd->is_current_stmt_binlog_format_row() ? "is" : "is NOT"));
|
||||
DBUG_PRINT("info",
|
||||
("Current table (at 0x%lu) %s a temporary (or non-existant) table",
|
||||
(ulong) table,
|
||||
table && !table->s->tmp_table ? "is NOT" : "is"));
|
||||
/*
|
||||
This will execute any rollbacks that are necessary before writing
|
||||
the transcation cache.
|
||||
|
||||
We disable the binary log since nothing should be written to the
|
||||
binary log. This disabling is important, since we potentially do
|
||||
a "roll back" of non-transactional tables by removing the table,
|
||||
and the actual rollback might generate events that should not be
|
||||
written to the binary log.
|
||||
|
||||
*/
|
||||
tmp_disable_binlog(thd);
|
||||
select_insert::send_error(errcode, err);
|
||||
reenable_binlog(thd);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
bool select_create::send_eof()
|
||||
{
|
||||
if (select_insert::send_eof())
|
||||
|
|
|
@ -2077,13 +2077,6 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||
}
|
||||
|
||||
|
||||
void multi_update::send_error(uint errcode,const char *err)
|
||||
{
|
||||
/* First send error what ever it is ... */
|
||||
my_error(errcode, MYF(0), err);
|
||||
}
|
||||
|
||||
|
||||
void multi_update::abort_result_set()
|
||||
{
|
||||
/* the error was handled or nothing deleted and no side effects return */
|
||||
|
@ -2406,7 +2399,7 @@ bool multi_update::send_eof()
|
|||
thd->transaction.stmt.modified_non_trans_table);
|
||||
|
||||
if (local_error != 0)
|
||||
error_handled= TRUE; // to force early leave from ::send_error()
|
||||
error_handled= TRUE; // to force early leave from ::abort_result_set()
|
||||
|
||||
if (local_error > 0) // if the above log write did not fail ...
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue