List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:December 18 2007 3:10pm
Subject:bk commit into 5.1 tree (aelkin:1.2804) BUG#33332
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of aelkin.  When aelkin does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-18 16:10:51+02:00, aelkin@stripped +1 -0
  Bug #33332 assert at the end of mysql_binlog_send
  
  The heartbeat code did not check possible error in net_flush which
  kept the dump thread hanging in heartbeating loop even though
  the slave has disappeared.
  When eventaully the dump thread was killed its cleanup did not use the error
  path and that led to an assert.
  
  Fixed with adding the check of net_flush return value. If one happens
  send_heartbeat_event() returns the error which forces the dump thread
  to exit along the error path.

  sql/sql_repl.cc@stripped, 2007-12-18 16:10:47+02:00, aelkin@stripped +3 -2
    adding net_flush error check

diff -Nrup a/sql/sql_repl.cc b/sql/sql_repl.cc
--- a/sql/sql_repl.cc	2007-12-11 00:13:40 +02:00
+++ b/sql/sql_repl.cc	2007-12-18 16:10:47 +02:00
@@ -373,11 +373,11 @@ static int send_heartbeat_event(NET* net
   packet->append(header, sizeof(header));
   packet->append(p, ident_len);             // log_file_name
 
-  if (my_net_write(net, (uchar*) packet->ptr(), packet->length()))
+  if (my_net_write(net, (uchar*) packet->ptr(), packet->length()) ||
+      net_flush(net))
   {
     DBUG_RETURN(-1);
   }
-  net_flush(net);
   packet->set("\0", 1, &my_charset_bin);
   DBUG_RETURN(0);
 }
@@ -757,6 +757,7 @@ impossible position";
               {
                 errmsg = "Failed on my_net_write()";
                 my_errno= ER_UNKNOWN_ERROR;
+                pthread_mutex_unlock(log_lock);
                 goto err;
               }
             }
Thread
bk commit into 5.1 tree (aelkin:1.2804) BUG#33332Andrei Elkin18 Dec