summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-08-18 16:04:26 +0300
committerunknown <monty@hundin.mysql.fi>2002-08-18 16:04:26 +0300
commit871b785694718071f991f2a9ae71b8336f7e67c6 (patch)
treeaf1548211472940ebe3bad8ee24a4d2ab26f2c92 /libmysql
parent0c8071a3a1f430640aa9911f51209cf844c8c2bf (diff)
downloadmariadb-git-871b785694718071f991f2a9ae71b8336f7e67c6.tar.gz
Fixed timing problem with rpl000001 replication test.
Fixed configure problems with HPUX and openbsd SHOW SLAVE STATUS returns empty set if slave is not initialized SHOW MASTER STATUS returns empty set if binary logging is not enabled. Fixed shutdown problem on Solaris. BitKeeper/deleted/.del-set_var.cc~5374527de1955359: Delete: libmysqld/set_var.cc BitKeeper/etc/ignore: added libmysqld/set_var.cc Build-tools/Do-compile: Remove warnings from touch during compilation Docs/manual.texi: Changelog client/mysqltest.c: Added real_sleep command configure.in: Fixed type for HPUX10 innobase/configure.in: Fixed type for openbsd libmysql/libmysql.c: Fix for new SHOW SLAVE STATUS myisam/mi_update.c: Update key file if using external locking mysql-test/mysql-test-run.sh: Safety fix mysql-test/r/rpl000015.result: Update for new SHOW SLAVE STATUS mysql-test/r/rpl_empty_master_crash.result: Update for new SHOW SLAVE STATUS mysql-test/t/rpl000001.test: sleep -> real_sleep to avoid timing problem sql/mysqld.cc: Fixed bug with SIGTERM on Solaris sql/slave.cc: SHOW SLAVE STATUS returns empty sets if slave is not initialized. sql/sql_repl.cc: SHOW MASTER STAT returns empty set if no binary logging.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index bc07bf0367c..c6f88c1fb60 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1259,11 +1259,12 @@ int STDCALL mysql_rpl_probe(MYSQL* mysql)
return 1;
}
- if (!(row = mysql_fetch_row(res)))
- goto err;
-
- /* check master host for emptiness/NULL */
- if (row[0] && *(row[0]))
+ row= mysql_fetch_row(res);
+ /*
+ Check master host for emptiness/NULL
+ For MySQL 4.0 it's enough to check for row[0]
+ */
+ if (row && row[0] && *(row[0]))
{
/* this is a slave, ask it for the master */
if (get_master(mysql, res, row) || get_slaves_from_master(mysql))