List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:May 16 2011 5:26pm
Subject:bzr push into mysql-trunk branch (alfranio.correia:3091 to 3092) Bug#12557307
View as plain text  
 3092 Alfranio Correia	2011-05-16
      BUG#12557307 - RPL.RPL_ROTATE_LOGS FAILS IN VALGRIND 
      
      The test case removes the master.info repository while it is being used. 
      So when the replication is restarted, the missing file is detected and
      recreated. This means that the reference to the repository is closed and
      the reopened.
      
      However, the IO_CACHE is not closed and is created twice thus leading to
      memory leaks. To fix the problem, we always close the IO_CACHE before the
      repository is closed.

    modified:
      sql/rpl_info_file.cc
 3091 Davi Arnaut	2011-05-16
      Fix warnings emitted by Clang.
     @ mysys/thr_alarm.c
        Remove spurious MYF(0).
     @ sql/binlog.h
        Access declarations are deprecated; use using declarations instead.
     @ sql/handler.cc
        Ignore unused result of the RUN_HOOK expression.
     @ sql/rpl_injector.cc
        new_trans(THD *thd) returns transaction by value, but
        transaction does not implement a copy constructor.
        Since this particular method is unused, remove it.
     @ sql/rpl_injector.h
        Remove the unused new_trans method.
     @ sql/rpl_master.cc
        Ignore unused result of the RUN_HOOK expression.
     @ sql/rpl_slave.cc
        Ignore unused result of the RUN_HOOK expression.
     @ sql/transaction.cc
        Ignore unused result of the RUN_HOOK expression.
     @ storage/innobase/handler/i_s.cc
        Clang does not support this deprecated GCC construct.
     @ strings/decimal.c
        Move minus operator next to the variable being negated.
        The mini_shift variable has no previous assignment at this point.

    modified:
      mysys/thr_alarm.c
      sql/binlog.h
      sql/handler.cc
      sql/rpl_injector.cc
      sql/rpl_injector.h
      sql/rpl_master.cc
      sql/rpl_slave.cc
      sql/transaction.cc
      storage/innobase/handler/i_s.cc
      strings/decimal.c
=== modified file 'sql/rpl_info_file.cc'
--- a/sql/rpl_info_file.cc	2011-04-05 16:46:24 +0000
+++ b/sql/rpl_info_file.cc	2011-05-16 17:26:11 +0000
@@ -54,7 +54,11 @@ int Rpl_info_file::do_init_info()
       the old descriptor and re-create the old file
     */
     if (info_fd >= 0)
+    {
+      if (my_b_inited(&info_file))
+        end_io_cache(&info_file);
       my_close(info_fd, MYF(MY_WME));
+    }
     if ((info_fd = my_open(info_fname, O_CREAT|O_RDWR|O_BINARY, MYF(MY_WME))) < 0)
     {
       sql_print_error("Failed to create a new info file (\
@@ -170,7 +174,8 @@ void Rpl_info_file::do_end_info()
 
   if (info_fd >= 0)
   {
-    end_io_cache(&info_file);
+    if (my_b_inited(&info_file))
+      end_io_cache(&info_file);
     my_close(info_fd, MYF(MY_WME));
     info_fd = -1;
   }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (alfranio.correia:3091 to 3092) Bug#12557307Alfranio Correia16 May