List:Commits« Previous MessageNext Message »
From:Nuno Carvalho Date:March 7 2012 4:55pm
Subject:bzr push into mysql-trunk branch (nuno.carvalho:3727 to 3728) Bug#13635612
View as plain text  
 3728 Nuno Carvalho	2012-03-07
      BUG#13635612: VALGRIND ERRORS IN REPLICATION
      
      There was a memory leak when a recovery is done on the slave, discarded 
      events were not deleted (2nd error on bug report).
      
      Changed the code in order to delete discarded events.

    modified:
      sql/rpl_slave.cc
 3727 Tor Didriksen	2012-03-07
      Remove warnings from windows 64-bit build.
      We have about 8800 warnings, half of which are due to different
      function signatures for send()/recv()/sendto()/recvfrom()
      They all take int rather than size_t for the buffer length.

    modified:
      include/mysql/psi/mysql_socket.h
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2012-03-05 13:23:07 +0000
+++ b/sql/rpl_slave.cc	2012-03-07 16:54:38 +0000
@@ -4381,13 +4381,17 @@ bool mts_recovery_groups(Relay_log_info
       */
       if (!checksum_detected)
       {
-        for (int i=0; i < 4; i++)
+        int i= 0;
+        while (i < 4 && (ev= Log_event::read_log_event(&log,
+               (mysql_mutex_t*) 0, p_fdle, 0)))
         {
-          if ((ev= Log_event::read_log_event(&log,
-                                             (mysql_mutex_t*) 0, p_fdle, 0))
-              && ev->get_type_code() == FORMAT_DESCRIPTION_EVENT)
+          if (ev->get_type_code() == FORMAT_DESCRIPTION_EVENT)
+          {
             p_fdle->checksum_alg= ev->checksum_alg;
-          checksum_detected= TRUE;
+            checksum_detected= TRUE;
+          }
+          delete ev;
+          i++;
         }
         if (!checksum_detected)
         {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (nuno.carvalho:3727 to 3728) Bug#13635612Nuno Carvalho8 Mar