diff options
author | guilhem@mysql.com <> | 2004-08-16 17:00:48 +0200 |
---|---|---|
committer | guilhem@mysql.com <> | 2004-08-16 17:00:48 +0200 |
commit | 44a599a305b77a4e79fdc06b9a3859eed92b1391 (patch) | |
tree | 40cdacfb5e709c95febb762f9e2d37ef26c0eb78 /sql/set_var.cc | |
parent | e0ea65e148fda90712b7a74f192f2a9be30d37f7 (diff) | |
download | mariadb-git-44a599a305b77a4e79fdc06b9a3859eed92b1391.tar.gz |
Fix for BUG#5064 "SET GLOBAL SYNC_BINLOG does not work on some platforms":
var->save_result.ulong_value was 0 on Mac OS X probably due to positions
of members in the union. sys_var::check() only sets ulonglong_value
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 2189356e51d..5db4b1476a6 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -34,6 +34,12 @@ - If the variable should show up in 'show variables' add it to the init_vars[] struct in this file + NOTES: + - Be careful with var->save_result: sys_var::check() only updates + ulonglong_value; so other members of the union are garbage then; to use + them you must first assign a value to them (in specific ::check() for + example). + TODO: - Add full support for the variable character_set (for 4.1) @@ -2332,7 +2338,7 @@ bool sys_var_slave_skip_counter::update(THD *thd, set_var *var) bool sys_var_sync_binlog_period::update(THD *thd, set_var *var) { pthread_mutex_t *lock_log= mysql_bin_log.get_log_lock(); - sync_binlog_period= var->save_result.ulong_value; + sync_binlog_period= (ulong) var->save_result.ulonglong_value; /* Must reset the counter otherwise it may already be beyond the new period and so the new period will not be taken into account. Need mutex otherwise |