summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authornick@nick.leippe.com <>2002-05-30 17:31:25 -0700
committernick@nick.leippe.com <>2002-05-30 17:31:25 -0700
commite62283b900ac54c3f9a159e1f7ec872cff6a00f3 (patch)
treef71ee8ada5e238a970c8cca7a65788f236fa2214 /sql/repl_failsafe.cc
parent7bde7e21b95bf3fb3caa564b35f85c6e1de07fc5 (diff)
downloadmariadb-git-e62283b900ac54c3f9a159e1f7ec872cff6a00f3.tar.gz
Fixed bug: load table from master w/empty master would hang.
Now it properly returns error. Added respective test case.
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))
{