summaryrefslogtreecommitdiff
path: root/sql/sys_vars.h
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/sys_vars.h
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/sys_vars.h')
-rw-r--r--sql/sys_vars.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/sql/sys_vars.h b/sql/sys_vars.h
index 31764aa82a4..b04e3817406 100644
--- a/sql/sys_vars.h
+++ b/sql/sys_vars.h
@@ -2020,3 +2020,43 @@ public:
}
};
+
+/**
+ Class for @@global.gtid_pos.
+*/
+class Sys_var_gtid_pos: public sys_var
+{
+public:
+ Sys_var_gtid_pos(const char *name_arg,
+ const char *comment, int flag_args, ptrdiff_t off, size_t size,
+ CMD_LINE getopt)
+ : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
+ getopt.arg_type, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG,
+ NULL, NULL, NULL)
+ {
+ option.var_type= GET_STR;
+ }
+ bool do_check(THD *thd, set_var *var);
+ bool session_update(THD *thd, set_var *var)
+ {
+ DBUG_ASSERT(false);
+ return true;
+ }
+ bool global_update(THD *thd, set_var *var);
+ bool check_update_type(Item_result type) { return type != STRING_RESULT; }
+ void session_save_default(THD *thd, set_var *var)
+ {
+ DBUG_ASSERT(false);
+ }
+ void global_save_default(THD *thd, set_var *var)
+ {
+ /* Record the attempt to use default so we can error. */
+ var->value= 0;
+ }
+ uchar *session_value_ptr(THD *thd, LEX_STRING *base)
+ {
+ DBUG_ASSERT(false);
+ return NULL;
+ }
+ uchar *global_value_ptr(THD *thd, LEX_STRING *base);
+};