#At file:///stuff/workspace/mysql-server/bugfix/5.1-rpl-28796/
2689 Luis Soares 2008-11-01
BUG#28796: Checks wether host argument is an empty string or not. If empty, reports an error to the client and returns, otherwise continue normally.
modified:
sql/sql_repl.cc
=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc 2008-09-29 05:36:42 +0000
+++ b/sql/sql_repl.cc 2008-11-01 01:02:50 +0000
@@ -1088,6 +1088,15 @@ bool change_master(THD* thd, Master_info
thd_proc_info(thd, "Changing master");
LEX_MASTER_INFO* lex_mi= &thd->lex->mi;
+
+ /* checks whether host argument is an empty string or not. */
+ if(lex_mi->host && strcmp(lex_mi->host, "") == 0)
+ {
+ 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))
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (luis.soares:2689) Bug#28796 | Luis Soares | 1 Nov |