summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-10-31 18:07:02 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-10-31 18:07:02 -0400
commit4d1511296288782df0e3d9373396724e250b24c1 (patch)
tree9fa47d141b71933859d6c2da585e5bb5e52db212 /sql/sql_repl.cc
parent17b0b45b1de41a1b188c5de6c3e9d8e6ecc48a72 (diff)
parentd775ecdd010daad4dc6147fba58acd006bf2c60c (diff)
downloadmariadb-git-4d1511296288782df0e3d9373396724e250b24c1.tar.gz
Merge tag 'mariadb-10.0.22' into 10.0-galera
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 6307108f4b2..af02c1ca966 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -2869,7 +2869,19 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
if (init_master_info(mi,master_info_file_tmp,relay_log_info_file_tmp, 0,
thread_mask))
slave_errno=ER_MASTER_INFO;
- else if (server_id_supplied && *mi->host)
+ else if (!server_id_supplied)
+ {
+ slave_errno= ER_BAD_SLAVE; net_report= 0;
+ my_message(slave_errno, "Misconfigured slave: server_id was not set; Fix in config file",
+ MYF(0));
+ }
+ else if (!*mi->host)
+ {
+ slave_errno= ER_BAD_SLAVE; net_report= 0;
+ my_message(slave_errno, "Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO",
+ MYF(0));
+ }
+ else
{
/*
If we will start SQL thread we will care about UNTIL options If
@@ -2963,8 +2975,6 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
relay_log_info_file_tmp,
thread_mask);
}
- else
- slave_errno = ER_BAD_SLAVE;
}
else
{
@@ -3321,7 +3331,8 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
*master_info_added= true;
}
if (global_system_variables.log_warnings > 1)
- sql_print_information("Master: '%.*s' Master_info_file: '%s' "
+ sql_print_information("Master connection name: '%.*s' "
+ "Master_info_file: '%s' "
"Relay_info_file: '%s'",
(int) mi->connection_name.length,
mi->connection_name.str,