summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc3
1 files changed, 3 insertions, 0 deletions
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;