summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-05-19 15:03:32 +0200
committerunknown <guilhem@mysql.com>2004-05-19 15:03:32 +0200
commit66c96f2c57edf8cff71734a8fa7fcba8b04f2f49 (patch)
tree00acd87e6f185f09985129e3d5b19adff169a285 /sql/slave.cc
parentefbf373be73237fcceeb485eab6a77ec935fb205 (diff)
downloadmariadb-git-66c96f2c57edf8cff71734a8fa7fcba8b04f2f49.tar.gz
Fix for BUG#3829 "Setting server_id on fly doesn't allow replication to start"
(fix by our Harrison Fisk): when one does SET GLOBAL SERVER_ID=x, we must set server_id_supplied to 1. sql/mysql_priv.h: server_id_supplied must be here to be visible in set_var.cc sql/mysqld.cc: rephrasing warnings when server id is not set explicitely. sql/set_var.cc: when one does SET GLOBAL SERVER_ID=x; it should be considered as explicitely setting the server id, so do server_id_supplied=1. sql/slave.cc: Correcting wrong comment
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index c7a7dac141a..be60b5e6217 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -143,13 +143,11 @@ int init_slave()
goto err;
}
- /*
- make sure slave thread gets started if server_id is set,
- valid master.info is present, and master_host has not been specified
- */
if (server_id && !master_host && active_mi->host[0])
master_host= active_mi->host;
+ /* If server id is not set, start_slave_thread() will say it */
+
if (master_host && !opt_skip_slave_start)
{
if (start_slave_threads(1 /* need mutex */,