diff options
author | mats@kindahl-laptop.dnsalias.net <> | 2007-06-09 07:19:37 +0200 |
---|---|---|
committer | mats@kindahl-laptop.dnsalias.net <> | 2007-06-09 07:19:37 +0200 |
commit | 9094e97aed8536e628cb6c5a81b79ecc6521be7a (patch) | |
tree | cdc21b3b7f0f7811d04f8bafebcee2697b8a7d3b /sql/rpl_rli.cc | |
parent | bba84e754d61918dd147f1926b338f5f82ee3150 (diff) | |
download | mariadb-git-9094e97aed8536e628cb6c5a81b79ecc6521be7a.tar.gz |
BUG#24954 (Last_errno and Last_error not set after master_retry_count was reached):
Adding new fields Last_{IO,SQL}_Errno and Last_{IO,SQL}_Error to output
of SHOW SLAVE STATUS to hold errors from I/O and SQL thread respectively.
Old fields Last_Error and Last_Errno are aliases for Last_SQL_Error and
Last_SQL_Errno respectively.
Fields are added last to output of SHOW SLAVE STATUS to allow old applications
to use the same positional arguments into the row, while allowing new
application to benefit from the added information.
In addition, some new error codes are added (especially for the I/O
thread) to be able to provide sensible error message.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index a2edb9dc8a8..104a2747eb4 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -29,10 +29,11 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, st_relay_log_info::st_relay_log_info() - :no_storage(FALSE), info_fd(-1), cur_log_fd(-1), save_temporary_tables(0), + :Slave_reporting_capability("SQL"), + no_storage(FALSE), info_fd(-1), cur_log_fd(-1), save_temporary_tables(0), cur_log_old_open_count(0), group_master_log_pos(0), log_space_total(0), ignore_log_space_limit(0), last_master_timestamp(0), slave_skip_counter(0), - abort_pos_wait(0), slave_run_id(0), sql_thd(0), last_slave_errno(0), + abort_pos_wait(0), slave_run_id(0), sql_thd(0), inited(0), abort_slave(0), slave_running(0), until_condition(UNTIL_NONE), until_log_pos(0), retried_trans(0), tables_to_lock(0), tables_to_lock_count(0), @@ -42,7 +43,7 @@ st_relay_log_info::st_relay_log_info() group_relay_log_name[0]= event_relay_log_name[0]= group_master_log_name[0]= 0; - last_slave_error[0]= until_log_name[0]= ign_master_log_name_end[0]= 0; + until_log_name[0]= ign_master_log_name_end[0]= 0; bzero((char*) &info_file, sizeof(info_file)); bzero((char*) &cache_buf, sizeof(cache_buf)); cached_charset_invalidate(); @@ -335,16 +336,6 @@ static int count_relay_log_space(RELAY_LOG_INFO* rli) } -void st_relay_log_info::clear_slave_error() -{ - DBUG_ENTER("clear_slave_error"); - - /* Clear the errors displayed by SHOW SLAVE STATUS */ - last_slave_error[0]= 0; - last_slave_errno= 0; - DBUG_VOID_RETURN; -} - /* Reset UNTIL condition for RELAY_LOG_INFO |