List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:April 5 2011 3:49pm
Subject:bzr commit into mysql-trunk branch (alfranio.correia:3328) Bug#58897
Bug#11765887
View as plain text  
#At file:///home/acorreia/workspace.oracle/repository.mysql/bzrwork/tmp/mysql-trunk/ based on revid:alfranio.correia@stripped

 3328 Alfranio Correia	2011-04-05
      Post-fix for BUG#11765887 - BUG#58897
      
      After switching to a new repository, the old repository should be
      closed and removed. Howerver, the original patch for BUG#11765887
      was not closing the repository before removing it.
      
      This buggy behavior was causing problems in the windows environment.

    modified:
      sql/rpl_info_factory.cc
=== modified file 'sql/rpl_info_factory.cc'
--- a/sql/rpl_info_factory.cc	2011-03-23 23:28:49 +0000
+++ b/sql/rpl_info_factory.cc	2011-04-05 15:49:03 +0000
@@ -335,11 +335,17 @@ bool Rpl_info_factory::decide_repository
 
       /Alfranio
     */
-    if (info->copy_info(*handler_src, *handler_dest) || (*handler_src)->remove_info())
+    if (info->copy_info(*handler_src, *handler_dest))
     {
       *msg= "Error transfering information";
       goto err;
     }
+    (*handler_src)->end_info();
+    if ((*handler_src)->remove_info())
+    {
+      *msg= "Error removing old repository";
+      goto err;
+    }
   }
 
   delete (*handler_src);
@@ -407,19 +413,17 @@ bool Rpl_info_factory::change_repository
 
       /Alfranio
     */
-    if (info->copy_info(*handler_src, *handler_dest) || (*handler_src)->remove_info())
+    if (info->copy_info(*handler_src, *handler_dest))
     {
       *msg= "Error transfering information";
       goto err;
     }
   }
-  else
+  (*handler_src)->end_info();
+  if ((*handler_src)->remove_info())
   {
-    if ((*handler_src)->remove_info())
-    {
-      *msg= "Error removing old repository";
-      goto err;
-    }
+    *msg= "Error removing old repository";
+    goto err;
   }
 
   info->set_rpl_info_handler(NULL);


Attachment: [text/bzr-bundle] bzr/alfranio.correia@oracle.com-20110405154903-mp5d3qyx4wxlpwnk.bundle
Thread
bzr commit into mysql-trunk branch (alfranio.correia:3328) Bug#58897Bug#11765887Alfranio Correia5 Apr