summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-10-23 12:46:29 +0200
committerunknown <knielsen@knielsen-hq.org>2012-10-23 12:46:29 +0200
commitab8e8f4b277c23e6989650e0590ec0a5fa03fb3a (patch)
tree55f94a23720a018908f99044fffd407b63ed7426 /sql/rpl_mi.cc
parentbe86e4428010f41804608c2d2ff7adcd9d6fb270 (diff)
downloadmariadb-git-ab8e8f4b277c23e6989650e0590ec0a5fa03fb3a.tar.gz
MDEV-500: Session variable for server_id
MDEV-26: Global transaction id, partial commit Change server_id to be a session variable. User with SUPER can set it to binlog with different server_id. Implement backward-compatible ::server_id mirror for plugins.
Diffstat (limited to 'sql/rpl_mi.cc')
-rw-r--r--sql/rpl_mi.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 65366becc41..ae9927c1204 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -61,7 +61,9 @@ Master_info::Master_info(LEX_STRING *connection_name_arg,
my_casedn_str(system_charset_info, cmp_connection_name.str);
}
- my_init_dynamic_array(&ignore_server_ids, sizeof(::server_id), 16, 16, MYF(0));
+ my_init_dynamic_array(&ignore_server_ids,
+ sizeof(global_system_variables.server_id), 16, 16,
+ MYF(0));
bzero((char*) &file, sizeof(file));
mysql_mutex_init(key_master_info_run_lock, &run_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_master_info_data_lock, &data_lock, MY_MUTEX_INIT_FAST);
@@ -510,7 +512,7 @@ int flush_master_info(Master_info* mi,
char* ignore_server_ids_buf;
{
ignore_server_ids_buf=
- (char *) my_malloc((sizeof(::server_id) * 3 + 1) *
+ (char *) my_malloc((sizeof(global_system_variables.server_id) * 3 + 1) *
(1 + mi->ignore_server_ids.elements), MYF(MY_WME));
if (!ignore_server_ids_buf)
DBUG_RETURN(1);