From 46f96a30b0484bb9877a9bdb2c7dec108b6e2963 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jul 2003 15:33:46 +0200 Subject: 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. --- sql/repl_failsafe.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v1.2.1