Below is the list of changes that have just been committed into a local
5.1 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:59:21+01:00, jonas@stripped +2 -0
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-work
MERGE: 1.1810.2123.23
storage/ndb/src/common/util/InputStream.cpp@stripped, 2006-11-21 11:59:19+01:00,
jonas@stripped +0 -2
merge
MERGE: 1.3.3.2
storage/ndb/src/common/util/InputStream.cpp@stripped, 2006-11-21 11:58:27+01:00,
jonas@stripped +0 -0
Merge rename: ndb/src/common/util/InputStream.cpp ->
storage/ndb/src/common/util/InputStream.cpp
storage/ndb/src/common/util/socket_io.cpp@stripped, 2006-11-21 11:58:27+01:00,
jonas@stripped +0 -0
Auto merged
MERGE: 1.7.5.2
storage/ndb/src/common/util/socket_io.cpp@stripped, 2006-11-21 11:58:27+01:00,
jonas@stripped +0 -0
Merge rename: ndb/src/common/util/socket_io.cpp ->
storage/ndb/src/common/util/socket_io.cpp
# 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/51-work/RESYNC
--- 1.3.3.1/ndb/src/common/util/InputStream.cpp 2006-11-21 11:59:26 +01:00
+++ 1.7/storage/ndb/src/common/util/InputStream.cpp 2006-11-21 11:59:26 +01:00
@@ -36,20 +36,35 @@
SocketInputStream::SocketInputStream(NDB_SOCKET_TYPE socket,
unsigned readTimeout)
- : m_socket(socket) {
- m_timeout = readTimeout;
+ : m_socket(socket) {
+ m_startover= true;
+ m_timeout = readTimeout;
}
-char*
+char*
SocketInputStream::gets(char * buf, int bufLen) {
- buf[0] = 77;
assert(bufLen >= 2);
- int res = readln_socket(m_socket, m_timeout, buf, bufLen - 1);
+ int offset= 0;
+ if(m_startover)
+ {
+ buf[0]= '\0';
+ m_startover= false;
+ }
+ else
+ offset= strlen(buf);
+
+ int res = readln_socket(m_socket, m_timeout, buf+offset, bufLen-offset, m_mutex);
+
+ if(res == 0)
+ {
+ buf[0]=0;
+ return buf;
+ }
+
+ m_startover= true;
+
if(res == -1)
return 0;
- if(res == 0 && buf[0] == 77)
- { // select return 0
- buf[0] = 0;
- }
+
return buf;
}
--- 1.7.5.1/ndb/src/common/util/socket_io.cpp 2006-11-21 11:59:26 +01:00
+++ 1.13/storage/ndb/src/common/util/socket_io.cpp 2006-11-21 11:59:26 +01:00
@@ -49,7 +49,7 @@
extern "C"
int
readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
- char * buf, int buflen){
+ char * buf, int buflen, NdbMutex *mutex){
if(buflen <= 1)
return 0;
@@ -61,7 +61,12 @@
timeout.tv_sec = (timeout_millis / 1000);
timeout.tv_usec = (timeout_millis % 1000) * 1000;
+ if(mutex)
+ NdbMutex_Unlock(mutex);
const int selectRes = select(socket + 1, &readset, 0, 0, &timeout);
+ if(mutex)
+ NdbMutex_Lock(mutex);
+
if(selectRes == 0){
return 0;
}
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2326) | jonas | 21 Nov |