diff options
author | unknown <guilhem@mysql.com> | 2004-05-19 15:03:32 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-05-19 15:03:32 +0200 |
commit | 66c96f2c57edf8cff71734a8fa7fcba8b04f2f49 (patch) | |
tree | 00acd87e6f185f09985129e3d5b19adff169a285 /sql/set_var.cc | |
parent | efbf373be73237fcceeb485eab6a77ec935fb205 (diff) | |
download | mariadb-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/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index eb94ad2ebf6..56208023d94 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -90,6 +90,7 @@ static void fix_max_relay_log_size(THD *thd, enum_var_type type); static void fix_max_connections(THD *thd, enum_var_type type); static void fix_thd_mem_root(THD *thd, enum_var_type type); static void fix_trans_mem_root(THD *thd, enum_var_type type); +static void fix_server_id(THD *thd, enum_var_type type); /* Variable definition list @@ -235,7 +236,7 @@ sys_var_thd_bool sys_query_cache_wlock_invalidate("query_cache_wlock_invalidate", &SV::query_cache_wlock_invalidate); #endif /* HAVE_QUERY_CACHE */ -sys_var_long_ptr sys_server_id("server_id",&server_id); +sys_var_long_ptr sys_server_id("server_id", &server_id, fix_server_id); sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol", &opt_slave_compressed_protocol); sys_var_long_ptr sys_slave_net_timeout("slave_net_timeout", @@ -811,6 +812,10 @@ static void fix_trans_mem_root(THD *thd, enum_var_type type) thd->variables.trans_prealloc_size); } +static void fix_server_id(THD *thd, enum_var_type type) +{ + server_id_supplied = 1; +} bool sys_var_long_ptr::update(THD *thd, set_var *var) { |