summaryrefslogtreecommitdiff
path: root/sql/sys_vars.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-08-23 14:02:13 +0200
committerunknown <knielsen@knielsen-hq.org>2013-08-23 14:02:13 +0200
commitf9c2b402f437a2278b04d971054fcacc57eb07aa (patch)
tree5e5beb8bd8ab697ca05f3c39ecb53fb85ee7f147 /sql/sys_vars.h
parent62d358295bbf8df16da75dd109c463de796dabe0 (diff)
downloadmariadb-git-f9c2b402f437a2278b04d971054fcacc57eb07aa.tar.gz
MDEV-26: Global transaction ID.
Implement @@gtid_binlog_state. This is the internal state of the binlog (most recent GTID logged for every domain_id and server_id). This allows to save the state before RESET MASTER and restore it afterwards.
Diffstat (limited to 'sql/sys_vars.h')
-rw-r--r--sql/sys_vars.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/sql/sys_vars.h b/sql/sys_vars.h
index 260a8af8384..e1c2201da31 100644
--- a/sql/sys_vars.h
+++ b/sql/sys_vars.h
@@ -2167,3 +2167,44 @@ public:
}
uchar *global_value_ptr(THD *thd, LEX_STRING *base);
};
+
+
+/**
+ Class for @@global.gtid_binlog_state.
+*/
+class Sys_var_gtid_binlog_state: public sys_var
+{
+public:
+ Sys_var_gtid_binlog_state(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);
+};