List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:May 16 2011 5:22pm
Subject:bzr commit into mysql-trunk branch (alfranio.correia:3088) Bug#12557307
View as plain text  
#At file:///home/acorreia/workspace.oracle/repository.mysql/bzrwork/mc/mysql-trunk/ based on revid:andrei.elkin@stripped

 3088 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
=== 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:22:28 +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;
   }


Attachment: [text/bzr-bundle] bzr/alfranio.correia@oracle.com-20110516172228-giga2krv35fw7evn.bundle
Thread
bzr commit into mysql-trunk branch (alfranio.correia:3088) Bug#12557307Alfranio Correia16 May