List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:June 2 2010 10:58am
Subject:bzr commit into mysql-5.1-rep-semisync branch (zhenxing.he:3133) Bug#52748
View as plain text  
#At file:///media/sdb2/hezx/work/mysql/bzr/b52748/5.1-rep-semisync/ based on revid:zhenxing.he@stripped

 3133 He Zhenxing	2010-06-02
      Post fix for bug#52748

    modified:
      plugin/semisync/semisync_master.cc
=== modified file 'plugin/semisync/semisync_master.cc'
--- a/plugin/semisync/semisync_master.cc	2010-06-01 08:54:52 +0000
+++ b/plugin/semisync/semisync_master.cc	2010-06-02 10:57:52 +0000
@@ -1126,12 +1126,13 @@ int ReplSemiSyncMaster::readSlaveReply(N
 
   log_file_pos = uint8korr(packet + REPLY_BINLOG_POS_OFFSET);
   log_file_len = packet_len - REPLY_BINLOG_NAME_OFFSET;
-  if (log_file_len > FN_REFLEN)
+  if (log_file_len >= FN_REFLEN)
   {
     sql_print_error("Read semi-sync reply binlog file length too large");
     goto l_end;
   }
   strncpy(log_file_name, (const char*)packet + REPLY_BINLOG_NAME_OFFSET, log_file_len);
+  log_file_name[log_file_len] = 0;
 
   if (trc_level & kTraceDetail)
     sql_print_information("%s: Got reply (%s, %lu)",


Attachment: [text/bzr-bundle] bzr/zhenxing.he@sun.com-20100602105752-t4tmrcyckzxrqvnm.bundle
Thread
bzr commit into mysql-5.1-rep-semisync branch (zhenxing.he:3133) Bug#52748He Zhenxing2 Jun