diff options
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_show_slave_hosts.result | 4 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result index bd605c6e0fb..79803cca0d0 100644 --- a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result @@ -10,11 +10,11 @@ connection master; SHOW SLAVE HOSTS; Server_id Host Port Master_id 3 slave2 SLAVE_PORT 1 -2 SLAVE_PORT 1 +2 localhost SLAVE_PORT 1 connection slave2; include/stop_slave_io.inc connection master; SHOW SLAVE HOSTS; Server_id Host Port Master_id -2 SLAVE_PORT 1 +2 localhost SLAVE_PORT 1 include/rpl_end.inc diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 18fc3d9431a..7905e112e2e 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -147,6 +147,9 @@ int THD::register_slave(uchar *packet, size_t packet_length) if (!(si->master_id= uint4korr(p))) si->master_id= global_system_variables.server_id; + if (!*si->host) + ::strmake(si->host, main_security_ctx.host_or_ip, sizeof(si->host)); + unregister_slave(); mysql_mutex_lock(&LOCK_thd_data); slave_info= si; |