diff options
author | Monty <monty@mariadb.org> | 2016-08-29 20:28:06 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-08-29 20:28:06 +0300 |
commit | 1c91569274219ac612fcfdea4764311e2377977c (patch) | |
tree | 3d00dcc739c364f5da4c202e4f631791d7b62496 /sql/sql_repl.cc | |
parent | e139d971ecbffe00d9a5626fdcd69aa1b9ba0f2c (diff) | |
download | mariadb-git-1c91569274219ac612fcfdea4764311e2377977c.tar.gz |
Set server_id to 1 by default and disallow to set it to 0
This makes it easier to setup master as on only have to set --log-bin.
Before this patch if one did set up the master with just --log-bin, slaves
could not connect until server_id was set on the master, which could be
both confusing and hard to do.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 36f0cd84cbf..6ece9b793c9 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -2116,12 +2116,6 @@ static int init_binlog_sender(binlog_send_info *info, info->error= ER_MASTER_FATAL_ERROR_READING_BINLOG; return 1; } - if (!server_id_supplied) - { - info->errmsg= "Misconfigured master - server id was not set"; - info->error= ER_MASTER_FATAL_ERROR_READING_BINLOG; - return 1; - } char search_file_name[FN_REFLEN]; const char *name=search_file_name; @@ -3072,12 +3066,6 @@ 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) - { - 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; |