diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-10-15 12:59:13 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-10-15 12:59:13 +0200 |
commit | f62c12b405ba7ec80b8e2490856b83c6f5899211 (patch) | |
tree | 010605c7f145da6ea6ac14b39abc4cf700d619b1 /sql/sys_vars.h | |
parent | f947f73b2b6d2bd246b81a9038224d2a85777520 (diff) | |
parent | f1afc003eefe0aafd3e070c7453d9e029d8445a8 (diff) | |
download | mariadb-git-f62c12b405ba7ec80b8e2490856b83c6f5899211.tar.gz |
Merge 10.0.14 into 10.1
Diffstat (limited to 'sql/sys_vars.h')
-rw-r--r-- | sql/sys_vars.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/sql/sys_vars.h b/sql/sys_vars.h index fa997416cbd..da93b765d0f 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -1985,7 +1985,8 @@ public: like sql_slave_skip_counter are GLOBAL. */ -class Sys_var_multi_source_ulong; +#define MASTER_INFO_VAR(X) my_offsetof(Master_info, X), sizeof(((Master_info *)0x10)->X) +class Sys_var_multi_source_ulonglong; class Master_info; typedef bool (*on_multi_source_update_function)(sys_var *self, THD *thd, @@ -1994,31 +1995,27 @@ bool update_multi_source_variable(sys_var *self, THD *thd, enum_var_type type); -class Sys_var_multi_source_ulong :public Sys_var_ulong +class Sys_var_multi_source_ulonglong :public Sys_var_ulonglong { ptrdiff_t master_info_offset; on_multi_source_update_function update_multi_source_variable_func; public: - Sys_var_multi_source_ulong(const char *name_arg, + Sys_var_multi_source_ulonglong(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, ptrdiff_t master_info_offset_arg, - uint min_val, uint max_val, uint def_val, - uint block_size, + size_t master_info_arg_size, + ulonglong min_val, ulonglong max_val, + ulonglong def_val, uint block_size, on_multi_source_update_function on_update_func) - :Sys_var_ulong(name_arg, comment, flag_args, off, size, - getopt, min_val, max_val, def_val, block_size, - 0, VARIABLE_NOT_IN_BINLOG, 0, update_multi_source_variable), + :Sys_var_ulonglong(name_arg, comment, flag_args, off, size, + getopt, min_val, max_val, def_val, block_size, + 0, VARIABLE_NOT_IN_BINLOG, 0, update_multi_source_variable), master_info_offset(master_info_offset_arg), update_multi_source_variable_func(on_update_func) { - } - bool session_update(THD *thd, set_var *var) - { - session_var(thd, uint)= (uint) (var->save_result.ulonglong_value); - /* Value should be moved to multi_master in on_update_func */ - return false; + SYSVAR_ASSERT(master_info_arg_size == size); } bool global_update(THD *thd, set_var *var) { @@ -2031,9 +2028,9 @@ public: } uchar *session_value_ptr(THD *thd, const LEX_STRING *base) { - uint *tmp, res; - tmp= (uint*) (((uchar*)&(thd->variables)) + offset); - res= get_master_info_uint_value(thd, master_info_offset); + ulonglong *tmp, res; + tmp= (ulonglong*) (((uchar*)&(thd->variables)) + offset); + res= get_master_info_ulonglong_value(thd, master_info_offset); *tmp= res; return (uchar*) tmp; } @@ -2041,7 +2038,7 @@ public: { return session_value_ptr(thd, base); } - uint get_master_info_uint_value(THD *thd, ptrdiff_t offset); + ulonglong get_master_info_ulonglong_value(THD *thd, ptrdiff_t offset); bool update_variable(THD *thd, Master_info *mi) { return update_multi_source_variable_func(this, thd, mi); |