mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
MDEV-10271: add master host/port info to slave thread exit messages
Sample log error message generated: mysql-test/var/log/mysqld.2.err:2021-01-21 13:02:30 8 [Note] Slave SQL thread exiting, replication stopped in log 'master-bin.000001' at position 329, master: 127.0.0.1:16000 mysql-test/var/log/mysqld.2.err:2021-01-21 13:02:30 7 [Note] Slave I/O thread exiting, read up to log 'master-bin.000001', position 329, master 127.0.0.1:16000 mysql-test/var/log/mysqld.2.err:2021-01-21 13:02:30 12 [Note] Slave SQL thread exiting, replication stopped in log 'master-bin.000001' at position 329; GTID position '', master: 127.0.0.1:16000 Reviewer: knielsen@knielsen-hq.org, Andrei and Sachin
This commit is contained in:
parent
9a08fcbf60
commit
fa14c423cd
1 changed files with 7 additions and 5 deletions
12
sql/slave.cc
12
sql/slave.cc
|
@ -5106,15 +5106,16 @@ 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);
|
||||
"position %llu, master %s:%d", IO_RPL_LOG_NAME, mi->master_log_pos,
|
||||
mi->host, mi->port);
|
||||
else
|
||||
{
|
||||
StringBuffer<100> tmp;
|
||||
mi->gtid_current_pos.to_string(&tmp);
|
||||
sql_print_information("Slave I/O thread exiting, read up to log '%s', "
|
||||
"position %llu; GTID position %s",
|
||||
"position %llu; GTID position %s, master %s:%d",
|
||||
IO_RPL_LOG_NAME, mi->master_log_pos,
|
||||
tmp.c_ptr_safe());
|
||||
tmp.c_ptr_safe(), mi->host, mi->port);
|
||||
}
|
||||
repl_semisync_slave.slave_stop(mi);
|
||||
thd->reset_query();
|
||||
|
@ -5717,8 +5718,9 @@ pthread_handler_t handle_slave_sql(void *arg)
|
|||
tmp.append(STRING_WITH_LEN("'"));
|
||||
}
|
||||
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());
|
||||
"log '%s' at position %llu%s, master: %s:%d", RPL_LOG_NAME,
|
||||
rli->group_master_log_pos, tmp.c_ptr_safe(),
|
||||
mi->host, mi->port);
|
||||
}
|
||||
#ifdef WITH_WSREP
|
||||
wsrep_after_command_before_result(thd);
|
||||
|
|
Loading…
Reference in a new issue