summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-04-15 10:55:27 +0200
committerunknown <knielsen@knielsen-hq.org>2013-04-15 10:55:27 +0200
commit665a31af2b7d0ecd66d5e54ed0544b5db3892732 (patch)
treed19eae18ae9ffff6e7b3d30b16cf7671c511700f /sql/item_func.cc
parent491047a24714be57409e42656057e56f99c65513 (diff)
parente5cbefeb899f6325fc99277c515a91f0843cdcd5 (diff)
downloadmariadb-git-665a31af2b7d0ecd66d5e54ed0544b5db3892732.tar.gz
MDEV-26: Global transaction ID. First alpha release.
Merge of 10.0-mdev26 feature tree into 10.0-base. Global transaction ID is prepended to each event group in the binlog. Slave connect can request to start from GTID position instead of specifying file name/offset of master binlog. This facilitates easy switch to a new master. Slave GTID state is stored in a table mysql.rpl_slave_state, which can be InnoDB to get crash-safe slave state. GTID includes a replication domain ID, allowing to keep track of distinct positions for each of multiple masters.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 878d041c76d..aa574eabf8c 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -5743,6 +5743,14 @@ longlong Item_func_get_system_var::val_int()
{
THD *thd= current_thd;
+ DBUG_EXECUTE_IF("simulate_non_gtid_aware_master",
+ {
+ if (0 == strcmp("gtid_domain_id", var->name.str))
+ {
+ my_error(ER_VAR_CANT_BE_READ, MYF(0), var->name.str);
+ return 0;
+ }
+ });
if (cache_present && thd->query_id == used_query_id)
{
if (cache_present & GET_SYS_VAR_CACHE_LONG)
@@ -6730,7 +6738,7 @@ ulonglong uuid_value;
void uuid_short_init()
{
- uuid_value= ((((ulonglong) server_id) << 56) +
+ uuid_value= ((((ulonglong) global_system_variables.server_id) << 56) +
(((ulonglong) server_start_time) << 24));
}