Commit 4337aa74 authored by unknown's avatar unknown

MWL#180: Fix bug where setting @@global.binlog_checksum did not actually change the value.

parent 7a36035b
...@@ -27,13 +27,22 @@ show binary logs; ...@@ -27,13 +27,22 @@ show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 # master-bin.000001 #
set @@global.binlog_checksum = NONE; set @@global.binlog_checksum = NONE;
select @@global.binlog_checksum;
@@global.binlog_checksum
NONE
*** must be rotations seen *** *** must be rotations seen ***
show binary logs; show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 # master-bin.000001 #
master-bin.000002 # master-bin.000002 #
set @@global.binlog_checksum = default; set @@global.binlog_checksum = default;
select @@global.binlog_checksum;
@@global.binlog_checksum
NONE
set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32;
select @@global.binlog_checksum;
@@global.binlog_checksum
CRC32
set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32;
set @@global.master_verify_checksum = 0; set @@global.master_verify_checksum = 0;
set @@global.master_verify_checksum = default; set @@global.master_verify_checksum = default;
......
...@@ -40,13 +40,16 @@ connection master; ...@@ -40,13 +40,16 @@ connection master;
source include/show_binary_logs.inc; source include/show_binary_logs.inc;
set @@global.binlog_checksum = NONE; set @@global.binlog_checksum = NONE;
select @@global.binlog_checksum;
--echo *** must be rotations seen *** --echo *** must be rotations seen ***
source include/show_binary_logs.inc; source include/show_binary_logs.inc;
set @@global.binlog_checksum = default; set @@global.binlog_checksum = default;
select @@global.binlog_checksum;
# testing lack of side-effects in non-effective update of binlog_checksum: # testing lack of side-effects in non-effective update of binlog_checksum:
set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32;
select @@global.binlog_checksum;
set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32;
set @@global.master_verify_checksum = 0; set @@global.master_verify_checksum = 0;
......
...@@ -6994,7 +6994,7 @@ static void ...@@ -6994,7 +6994,7 @@ static void
binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var, binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var,
void *var_ptr, const void *save) void *var_ptr, const void *save)
{ {
ulong value= *((ulong *)var_ptr); ulong value= *((ulong *)save);
pthread_mutex_lock(mysql_bin_log.get_log_lock()); pthread_mutex_lock(mysql_bin_log.get_log_lock());
if(mysql_bin_log.is_open()) if(mysql_bin_log.is_open())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment