diff options
author | Daniel Black <daniel@mariadb.org> | 2016-06-22 15:52:07 +0200 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2021-01-22 10:06:33 +1100 |
commit | 29d9897fe2f46bf72356671ee3ad094abfe032c3 (patch) | |
tree | fe6a699db4772d61bb94de11e7e4115778e3489f /sql | |
parent | eb75e8705d9a444e10057967eaebf947b1115ff8 (diff) | |
download | mariadb-git-29d9897fe2f46bf72356671ee3ad094abfe032c3.tar.gz |
MDEV-10272: add master host/port info to slave thread exit messages
Sample log error message generated:
2021-01-21 2:33:24 139912137520896 [Note] Slave SQL thread exiting, replication stopped in log 'master-bin.000001' at position 369
33:24 139912137520896 [Note] master was 127.0.0.1:16400
2021-01-21 2:33:24 139912137828096 [Note] Slave I/O thread exiting, read up to log 'master-bin.000001', position 369
2021-01-21 2:33:24 139912137828096 [Note] master was 127.0.0.1:16400
Based on work by Hartmut Holzgraefe.
Reviewer: knielsen@knielsen-hq.org, Andrei, Sachin
Diffstat (limited to 'sql')
-rw-r--r-- | sql/slave.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index a2c35e5f116..5685769bbfb 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4646,8 +4646,11 @@ log space"); err: // print the current replication position if (mi->using_gtid == Master_info::USE_GTID_NO) + { sql_print_information("Slave I/O thread exiting, read up to log '%s', " "position %llu", IO_RPL_LOG_NAME, mi->master_log_pos); + sql_print_information("master was %s:%d", mi->host, mi->port); + } else { StringBuffer<100> tmp; @@ -4656,6 +4659,7 @@ err: "position %llu; GTID position %s", IO_RPL_LOG_NAME, mi->master_log_pos, tmp.c_ptr_safe()); + sql_print_information("master was %s:%d", mi->host, mi->port); } RUN_HOOK(binlog_relay_io, thread_stop, (thd, mi)); thd->reset_query(); @@ -5244,6 +5248,7 @@ pthread_handler_t handle_slave_sql(void *arg) sql_print_information("Slave SQL thread exiting, replication stopped in " "log '%s' at position %llu%s", RPL_LOG_NAME, rli->group_master_log_pos, tmp.c_ptr_safe()); + sql_print_information("master was %s:%d", mi->host, mi->port); } err_before_start: |