diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2014-07-18 19:45:21 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2014-07-18 19:45:21 +0400 |
commit | 54538b481d0adac73da7054740122d05611cffac (patch) | |
tree | 8849628de202775b3cd4fdcb9f0add9af5740c3a /sql/sys_vars.h | |
parent | c0ebb3f38811c6a0e3e2b49b3ae40b4ea0c2b0e9 (diff) | |
download | mariadb-git-54538b481d0adac73da7054740122d05611cffac.tar.gz |
MDEV-6459 - max_relay_log_size and sql_slave_skip_counter
misbehave on PPC64
There was a mix of ulong and uint casts/variables which caused
incorrect value to be passed to/retrieved from max_relay_log_size
and sql_slave_skip_counter.
This mix failed to work on big-endian PPC64 where sizeof(int)= 4,
sizeof(long)= 8. E.g. session_var(thd, uint)= 1 will in fact store
0x100000000.
Diffstat (limited to 'sql/sys_vars.h')
-rw-r--r-- | sql/sys_vars.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sys_vars.h b/sql/sys_vars.h index 495099b9c59..e7f9cf8a886 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -2012,7 +2012,7 @@ public: ptrdiff_t off, size_t size, CMD_LINE getopt, ptrdiff_t master_info_offset_arg, - uint min_val, uint max_val, uint def_val, + ulong min_val, ulong max_val, ulong def_val, uint block_size, on_multi_source_update_function on_update_func) :Sys_var_ulong(name_arg, comment, flag_args, off, size, @@ -2024,7 +2024,7 @@ public: } bool session_update(THD *thd, set_var *var) { - session_var(thd, uint)= (uint) (var->save_result.ulonglong_value); + session_var(thd, ulong)= (ulong) (var->save_result.ulonglong_value); /* Value should be moved to multi_master in on_update_func */ return false; } @@ -2039,9 +2039,9 @@ public: } uchar *session_value_ptr(THD *thd,LEX_STRING *base) { - uint *tmp, res; - tmp= (uint*) (((uchar*)&(thd->variables)) + offset); - res= get_master_info_uint_value(thd, master_info_offset); + ulong *tmp, res; + tmp= (ulong*) (((uchar*)&(thd->variables)) + offset); + res= get_master_info_ulong_value(thd, master_info_offset); *tmp= res; return (uchar*) tmp; } @@ -2049,7 +2049,7 @@ public: { return session_value_ptr(thd, base); } - uint get_master_info_uint_value(THD *thd, ptrdiff_t offset); + ulong get_master_info_ulong_value(THD *thd, ptrdiff_t offset); bool update_variable(THD *thd, Master_info *mi) { return update_multi_source_variable_func(this, thd, mi); |