diff options
author | nick@nick.leippe.com <> | 2002-05-30 17:31:25 -0700 |
---|---|---|
committer | nick@nick.leippe.com <> | 2002-05-30 17:31:25 -0700 |
commit | e62283b900ac54c3f9a159e1f7ec872cff6a00f3 (patch) | |
tree | f71ee8ada5e238a970c8cca7a65788f236fa2214 /sql/repl_failsafe.cc | |
parent | 7bde7e21b95bf3fb3caa564b35f85c6e1de07fc5 (diff) | |
download | mariadb-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.cc | 3 |
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)) { |