Below is the list of changes that have just been committed into a local
5.0 repository of stewart. When stewart 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-10-05 23:48:38+10:00, stewart@willster.(none) +2 -0
Merge willster.(none):/home/stewart/Documents/MySQL/5.0/ndb
into willster.(none):/home/stewart/Documents/MySQL/5.0/bug13987-5.0_bugfixonly
MERGE: 1.2248.12.1
ndb/include/mgmapi/mgmapi.h@stripped, 2006-10-05 23:48:34+10:00, stewart@willster.(none) +0 -0
Auto merged
MERGE: 1.49.2.1
ndb/src/mgmapi/mgmapi.cpp@stripped, 2006-10-05 23:48:34+10:00, stewart@willster.(none) +0 -0
Auto merged
MERGE: 1.61.2.1
# 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: stewart
# Host: willster.(none)
# Root: /home/stewart/Documents/MySQL/5.0/bug13987-5.0_bugfixonly/RESYNC
--- 1.51/ndb/include/mgmapi/mgmapi.h 2006-10-05 23:48:43 +10:00
+++ 1.52/ndb/include/mgmapi/mgmapi.h 2006-10-05 23:48:43 +10:00
@@ -1092,6 +1092,19 @@
int ndb_mgm_end_session(NdbMgmHandle handle);
/**
+ * ndb_mgm_get_fd
+ *
+ * get the file descriptor of the handle.
+ * INTERNAL ONLY.
+ * USE FOR TESTING. OTHER USES ARE NOT A GOOD IDEA.
+ *
+ * @param handle NDB management handle
+ * @return handle->socket
+ *
+ */
+ int ndb_mgm_get_fd(NdbMgmHandle handle);
+
+ /**
* Get the node id of the mgm server we're connected to
*/
Uint32 ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle);
--- 1.63/ndb/src/mgmapi/mgmapi.cpp 2006-10-05 23:48:43 +10:00
+++ 1.64/ndb/src/mgmapi/mgmapi.cpp 2006-10-05 23:48:43 +10:00
@@ -565,6 +565,18 @@
}
/**
+ * Only used for low level testing
+ * Never to be used by end user.
+ * Or anybody who doesn't know exactly what they're doing.
+ */
+extern "C"
+int
+ndb_mgm_get_fd(NdbMgmHandle handle)
+{
+ return handle->socket;
+}
+
+/**
* Disconnect from a mgm server
*/
extern "C"
@@ -754,22 +766,16 @@
SET_ERROR(handle, NDB_MGM_ILLEGAL_SERVER_REPLY, "Probably disconnected");
return NULL;
}
- if(buf[strlen(buf)-1] == '\n')
- buf[strlen(buf)-1] = '\0';
-
- if(strcmp("node status", buf) != 0) {
+ if(strcmp("node status\n", buf) != 0) {
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
return NULL;
}
-
if(!in.gets(buf, sizeof(buf)))
{
SET_ERROR(handle, NDB_MGM_ILLEGAL_SERVER_REPLY, "Probably disconnected");
return NULL;
}
- if(buf[strlen(buf)-1] == '\n')
- buf[strlen(buf)-1] = '\0';
-
+
BaseString tmp(buf);
Vector<BaseString> split;
tmp.split(split, ":");
@@ -777,7 +783,7 @@
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
return NULL;
}
-
+
if(!(split[0].trim() == "nodes")){
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
return NULL;
@@ -2381,7 +2387,6 @@
SocketOutputStream out(handle->socket);
SocketInputStream in(handle->socket, handle->read_timeout);
char buf[32];
-
if (out.println("check connection"))
goto ndb_mgm_check_connection_error;
@@ -2591,7 +2596,6 @@
SocketInputStream in(handle->socket, handle->read_timeout);
char buf[32];
-
in.gets(buf, sizeof(buf));
DBUG_RETURN(0);
| Thread |
|---|
| • bk commit into 5.0 tree (stewart:1.2259) | Stewart Smith | 5 Oct |