diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2009-09-29 15:27:12 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2009-09-29 15:27:12 +0100 |
commit | 0110bd04d24503d84df93d31b444586c4137c98c (patch) | |
tree | 843223e93a47492e606ba45437990affb3529d89 /sql/set_var.h | |
parent | 25162d0166206ee4819ece2161d26caa01153723 (diff) | |
download | mariadb-git-0110bd04d24503d84df93d31b444586c4137c98c.tar.gz |
BUG#35542 Add option to sync master and relay log to disk after every event
BUG#31665 sync_binlog should cause relay logs to be synchronized
NOTE: Backporting the patch to next-mr.
Add sync_relay_log option to server, this option works for relay log
the same as option sync_binlog for binlog. This option also synchronize
master info to disk when set to non-zero value.
Original patches from Sinisa and Mark, with some modifications
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index a3ed8e5be15..02c87abed88 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -175,6 +175,27 @@ public: { return (uchar*) value; } }; +/** + Unsigned int system variable class + */ +class sys_var_int_ptr :public sys_var +{ +public: + sys_var_int_ptr(sys_var_chain *chain, const char *name_arg, + uint *value_ptr_arg, + sys_after_update_func after_update_arg= NULL) + :sys_var(name_arg, after_update_arg), + value(value_ptr_arg) + { chain_sys_var(chain); } + bool check(THD *thd, set_var *var); + bool update(THD *thd, set_var *var); + void set_default(THD *thd, enum_var_type type); + SHOW_TYPE show_type() { return SHOW_INT; } + uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) + { return (uchar*) value; } +private: + uint *value; +}; /* A global ulong variable that is protected by LOCK_global_system_variables |