summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authorunknown <nick@nick.leippe.com>2002-05-30 17:31:25 -0700
committerunknown <nick@nick.leippe.com>2002-05-30 17:31:25 -0700
commit0720fe5927cfe4715b2eb3922bddf5268425b9fb (patch)
treef71ee8ada5e238a970c8cca7a65788f236fa2214 /sql/repl_failsafe.cc
parent676c018344e04f5f612b334cc5db863adde88b00 (diff)
downloadmariadb-git-0720fe5927cfe4715b2eb3922bddf5268425b9fb.tar.gz
Fixed bug: load table from master w/empty master would hang.
Now it properly returns error. Added respective test case. sql/repl_failsafe.cc: fixed bug: load table from master w/ empty master would hang. Now it properly returns error.
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 257418d1682..fab1491fc2b 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -608,6 +608,9 @@ int show_slave_hosts(THD* thd)
int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi)
{
+ if (!mi->host || !*mi->host) /* empty host */
+ return 1;
+
if (!mc_mysql_connect(mysql, mi->host, mi->user, mi->password, 0,
mi->port, 0, 0))
{