List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:December 28 2010 11:32pm
Subject:bzr commit into mysql-trunk branch (andrei.elkin:3447) Bug#59179
View as plain text  
#At file:///home/andrei/MySQL/BZR/2a-23May/mysql-5.6.1-m5-release/ based on revid:andrei.elkin@stripped

 3447 Andrei Elkin	2010-12-29
      bug#59179 binlog_checksum and rpl_checksum_cache time out on Linux in release builds
      
      The issue appeared to be a hang in attempt to lock a mutex in MYSQL_BIN_LOG::rotate_and_purge()
      which should not be attempted in an execution branch that calls the methods
      from  Sys_var_enum_binlog_checksum::global_update().
      The hang is ia64 compilation env specific and is caused by incorrect computation of `flags'
      when its assigment include the third bitwise OR argument that is ( ? : ) expression.
      In that case the value of `flags' is always the value of `( ? : )' that is 4 or zero.
      
      This indicates most probably the ia64 compiler issue.
      
      Fixed with splitting flags caclulation into two parts which does not create the reported
      issue but rather the value becomes correct.
      
      
      
      
      ******
      an experimental commit to fixing bug59179.
     @ sql/binlog.cc
        signature changed.
     @ sql/binlog.h
        Explicit size of a integer is set to rotate_and_purge()'s argument.
     @ sql/sys_vars.cc
        splitting flags caclulation into two parts to work around ia64 wrong OR evaluation.

    modified:
      sql/binlog.cc
      sql/binlog.h
      sql/sys_vars.cc
=== modified file 'sql/binlog.cc'
--- a/sql/binlog.cc	2010-12-17 02:01:32 +0000
+++ b/sql/binlog.cc	2010-12-28 23:32:47 +0000
@@ -3483,7 +3483,7 @@ unlock:
   @retval
     nonzero - error 
 */
-int MYSQL_BIN_LOG::rotate_and_purge(uint flags)
+int MYSQL_BIN_LOG::rotate_and_purge(uint8 flags)
 {
   int error= 0;
   DBUG_ENTER("MYSQL_BIN_LOG::rotate_and_purge");

=== modified file 'sql/binlog.h'
--- a/sql/binlog.h	2010-12-10 16:55:50 +0000
+++ b/sql/binlog.h	2010-12-28 23:32:47 +0000
@@ -219,7 +219,7 @@ public:
   void make_log_name(char* buf, const char* log_ident);
   bool is_active(const char* log_file_name);
   int update_log_index(LOG_INFO* linfo, bool need_update_threads);
-  int rotate_and_purge(uint flags);
+  int rotate_and_purge(uint8 flags);
   /**
      Flush binlog cache and synchronize to disk.
 

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2010-12-20 13:26:51 +0000
+++ b/sql/sys_vars.cc	2010-12-28 23:32:47 +0000
@@ -1941,9 +1941,10 @@ bool Sys_var_enum_binlog_checksum::globa
   mysql_mutex_lock(mysql_bin_log.get_log_lock());
   if(mysql_bin_log.is_open())
   {
-    uint flags= RP_FORCE_ROTATE | RP_LOCK_LOG_IS_ALREADY_LOCKED |
-      (binlog_checksum_options != (uint) var->save_result.ulonglong_value?
-       RP_BINLOG_CHECKSUM_ALG_CHANGE : 0);
+    uint8 flags= (RP_FORCE_ROTATE | RP_LOCK_LOG_IS_ALREADY_LOCKED);
+    flags |= (binlog_checksum_options !=
+              (ulong) var->save_result.ulonglong_value?
+              RP_BINLOG_CHECKSUM_ALG_CHANGE : 0);
     if (flags & RP_BINLOG_CHECKSUM_ALG_CHANGE)
       mysql_bin_log.checksum_alg_reset= (uint8) var->save_result.ulonglong_value;
     mysql_bin_log.rotate_and_purge(flags);


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20101228233247-7jnx9mijtvn8fklp.bundle
Thread
bzr commit into mysql-trunk branch (andrei.elkin:3447) Bug#59179Andrei Elkin29 Dec
  • Re: bzr commit into mysql-trunk branch (andrei.elkin:3447) Bug#59179He Zhenxing30 Dec