diff options
author | Luis Soares <luis.soares@sun.com> | 2009-09-30 12:48:22 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-09-30 12:48:22 +0100 |
commit | 2f51f7582599d20e1bab25d5dd4bd453ad009568 (patch) | |
tree | dd521c6232dfcb48f1f99b68bfd43f351469ad62 /sql/sql_repl.cc | |
parent | 3ab71376ceb2d5da81d3b6fb092630d0b0929d76 (diff) | |
parent | ba98c882728a6ea3f03566f3548c7c40a21567b3 (diff) | |
download | mariadb-git-2f51f7582599d20e1bab25d5dd4bd453ad009568.tar.gz |
Automerge: mysql-5.1-rep+2 (local backports) --> mysql-5.1-rep+2 (local latest)
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 6295dbb0e79..2d8fbb5f200 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1150,6 +1150,19 @@ bool change_master(THD* thd, Master_info* mi) thd_proc_info(thd, "Changing master"); LEX_MASTER_INFO* lex_mi= &thd->lex->mi; + /* + We need to check if there is an empty master_host. Otherwise + change master succeeds, a master.info file is created containing + empty master_host string and when issuing: start slave; an error + is thrown stating that the server is not configured as slave. + (See BUG#28796). + */ + if(lex_mi->host && !*lex_mi->host) + { + my_error(ER_WRONG_ARGUMENTS, MYF(0), "MASTER_HOST"); + unlock_slave_threads(mi); + DBUG_RETURN(TRUE); + } // TODO: see if needs re-write if (init_master_info(mi, master_info_file, relay_log_info_file, 0, thread_mask)) |