From: Date: November 21 2006 11:57am Subject: bk commit into 5.0 tree (jonas:1.2267) BUG#24011 List-Archive: http://lists.mysql.com/commits/15624 X-Bug: 24011 Message-Id: <20061121130858.8BB0F546EC3@perch.ndb.mysql.com> 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, 2006-11-21 11:57:41+01:00, jonas@stripped +2 -0 ndb - Fix bug wrt to '\r' handling in latest commit to bug#24011 ndb/src/common/util/InputStream.cpp@stripped, 2006-11-21 11:57:39+01:00, jonas@stripped +2 -8 Fix bug wrt to '\r' handling in latest commit to bug#24011 ndb/src/common/util/socket_io.cpp@stripped, 2006-11-21 11:57:39+01:00, jonas@stripped +5 -0 Fix bug wrt to '\r' handling in latest commit to bug#24011 # 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-work --- 1.3/ndb/src/common/util/InputStream.cpp 2006-11-21 11:57:44 +01:00 +++ 1.4/ndb/src/common/util/InputStream.cpp 2006-11-21 11:57:44 +01:00 @@ -47,15 +47,9 @@ int res = readln_socket(m_socket, m_timeout, buf, bufLen - 1); if(res == -1) return 0; - if(res == 0 && buf[0] == 77){ // select return 0 + if(res == 0 && buf[0] == 77) + { // select return 0 buf[0] = 0; - } else if(res == 0 && buf[0] == 0){ // only newline - buf[0] = '\n'; - buf[1] = 0; - } else { - int len = strlen(buf); - buf[len + 1] = '\0'; - buf[len] = '\n'; } return buf; } --- 1.9/ndb/src/common/util/socket_io.cpp 2006-11-21 11:57:44 +01:00 +++ 1.10/ndb/src/common/util/socket_io.cpp 2006-11-21 11:57:44 +01:00 @@ -98,6 +98,11 @@ ptr += t; len -= t; } + if (i > 0 && buf[i-1] == '\r') + { + buf[i-1] = '\n'; + ptr--; + } ptr[0]= 0; return ptr - buf; }