diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-26 22:32:20 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-26 22:32:20 +0100 |
commit | e29a4dd51989b4574f6d129268d8f255d5c9de2e (patch) | |
tree | 714f82955d876588024e5ed81b86f816b8d31256 /sql | |
parent | 707dd6b9e937fea193c6981ce1b495c185310be4 (diff) | |
download | mariadb-git-e29a4dd51989b4574f6d129268d8f255d5c9de2e.tar.gz |
MDEV-5433 select_result::send_error() is unused
remove dead code
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.cc | 20 | ||||
-rw-r--r-- | sql/sql_class.h | 10 | ||||
-rw-r--r-- | sql/sql_delete.cc | 13 | ||||
-rw-r--r-- | sql/sql_insert.cc | 40 | ||||
-rw-r--r-- | sql/sql_update.cc | 9 |
5 files changed, 4 insertions, 88 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ae863504202..65499675455 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -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)); diff --git a/sql/sql_class.h b/sql/sql_class.h index 77410c2b52e..801fe2d0206 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -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() diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index a8f4018a53b..b3a8eb2a97b 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -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) { diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index e258ac14776..bf512fef67d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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()) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 153fae1b895..b9655984264 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -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 ... { |