From: Date: January 23 2008 12:56pm Subject: bk commit into 5.0 tree (jonas:1.2410) BUG#34005 List-Archive: http://lists.mysql.com/commits/41146 X-Bug: 34005 Message-Id: <20080123115630.1FDAC42AE@perch.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of jonas. When jonas 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, 2008-01-23 12:56:27+01:00, jonas@stripped +1 -0 ndb - bug#34005 make sure whole send buffer is flushed, even when wrapping around end ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2008-01-23 12:56:26+01:00, jonas@stripped +16 -6 ndb - bug#34005 make sure whole send buffer is flush, even when wrapping around end # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/50-telco-gca --- 1.11/ndb/src/common/transporter/TCP_Transporter.cpp 2008-01-23 12:56:30 +01:00 +++ 1.12/ndb/src/common/transporter/TCP_Transporter.cpp 2008-01-23 12:56:30 +01:00 @@ -330,22 +330,32 @@ // Empty the SendBuffers - const char * const sendPtr = m_sendBuffer.sendPtr; - const Uint32 sizeToSend = m_sendBuffer.sendDataSize; - if (sizeToSend > 0){ + bool sent_any = true; + while (m_sendBuffer.dataSize > 0) + { + const char * const sendPtr = m_sendBuffer.sendPtr; + const Uint32 sizeToSend = m_sendBuffer.sendDataSize; const int nBytesSent = inet_send(theSocket, sendPtr, sizeToSend, 0); - if (nBytesSent > 0) { + if (nBytesSent > 0) + { + sent_any = true; m_sendBuffer.bytesSent(nBytesSent); sendCount ++; sendSize += nBytesSent; - if(sendCount == reportFreq){ + if(sendCount == reportFreq) + { reportSendLen(get_callback_obj(), remoteNodeId, sendCount, sendSize); sendCount = 0; sendSize = 0; } - } else { + } + else + { + if (nBytesSent < 0 && InetErrno == EAGAIN && sent_any) + break; + // Send failed #if defined DEBUG_TRANSPORTER ndbout_c("Send Failure(disconnect==%d) to node = %d nBytesSent = %d "