List:Commits« Previous MessageNext Message »
From:Luis Soares Date:May 4 2011 1:54pm
Subject:bzr commit into mysql-5.5 branch (luis.soares:3489) Bug#12425924
View as plain text  
#At file:///home/lsoares/Workspace/bzr/work/bugfixing/valgrind.warnings/mysql-5.5-commit/ based on revid:build@stripped

 3489 Luis Soares	2011-05-04 [merge]
      BUG#12425924: SEMI-SYNC RELATED VALGRIND WARNINGS IN 5.5 CODEBASE
      
      There are a couple of valgrind warnings in 5.5 codebase, that
      do not exist in 5.6. The root cause was found and fixed in 5.6
      codebase before (BUG#11763880 and BUG#11763879), but the patches
      were only pushed to 5.6.
      
      To fix it in 5.5, we cherrypicked the csets from 5.6 and merged 
      them in 5.5.

    modified:
      plugin/semisync/semisync_slave_plugin.cc
      sql/rpl_handler.h
=== modified file 'plugin/semisync/semisync_slave_plugin.cc'
--- a/plugin/semisync/semisync_slave_plugin.cc	2010-05-31 15:29:54 +0000
+++ b/plugin/semisync/semisync_slave_plugin.cc	2011-05-04 13:07:59 +0000
@@ -53,7 +53,6 @@ int repl_semi_slave_request_dump(Binlog_
   if (mysql_real_query(mysql, query, strlen(query)) ||
       !(res= mysql_store_result(mysql)))
   {
-    mysql_free_result(mysql_store_result(mysql));
     sql_print_error("Execution failed on master: %s", query);
     return 1;
   }
@@ -65,8 +64,10 @@ int repl_semi_slave_request_dump(Binlog_
     sql_print_warning("Master server does not support semi-sync, "
                       "fallback to asynchronous replication");
     rpl_semi_sync_slave_status= 0;
+    mysql_free_result(res);
     return 0;
   }
+  mysql_free_result(res);
 
   /*
     Tell master dump thread that we want to do semi-sync
@@ -76,7 +77,6 @@ int repl_semi_slave_request_dump(Binlog_
   if (mysql_real_query(mysql, query, strlen(query)))
   {
     sql_print_error("Set 'rpl_semi_sync_slave=1' on master failed");
-    mysql_free_result(mysql_store_result(mysql));
     return 1;
   }
   mysql_free_result(mysql_store_result(mysql));

=== modified file 'sql/rpl_handler.h'
--- a/sql/rpl_handler.h	2010-03-31 14:05:33 +0000
+++ b/sql/rpl_handler.h	2011-05-04 13:09:54 +0000
@@ -73,7 +73,10 @@ public:
     while (info && info->observer != observer)
       info= iter++;
     if (info)
+    {
       iter.remove();
+      delete info;
+    }
     else
       ret= TRUE;
     unlock();


Attachment: [text/bzr-bundle] bzr/luis.soares@oracle.com-20110504135435-jdgh08vj0m79qs8e.bundle
Thread
bzr commit into mysql-5.5 branch (luis.soares:3489) Bug#12425924Luis Soares4 May