diff options
author | unknown <guilhem@mysql.com> | 2003-07-28 15:33:46 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-07-28 15:33:46 +0200 |
commit | 46f96a30b0484bb9877a9bdb2c7dec108b6e2963 (patch) | |
tree | d5fd34fca5c07b445a658df5934ecb5441401599 /sql/repl_failsafe.cc | |
parent | 6ccebbaf641d47a06ea37239f0ad8c1cad4b3abe (diff) | |
download | mariadb-git-46f96a30b0484bb9877a9bdb2c7dec108b6e2963.tar.gz |
Avoid segfault when LOAD DATA FROM MASTER is run on a master which does no
binary logging.
sql/repl_failsafe.cc:
If the master is running without --log-bin, SHOW MASTER STATUS will return
"empty set", i.e. row==0; we must test this before invoking row[0], or
segfault.
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r-- | sql/repl_failsafe.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 1552b3994e9..0a5f90617d1 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -860,7 +860,7 @@ int load_master_data(THD* thd) of LOAD DATA FROM MASTER - no reason to forbid it, really, although it does not make much sense for the user to do it */ - if (row[0] && row[1]) + if (row && row[0] && row[1]) { strmake(active_mi->master_log_name, row[0], sizeof(active_mi->master_log_name)); |