Below is the list of changes that have just been committed into a local
5.0 repository of justin.he. When justin.he 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, 2007-03-23 18:49:56+08:00, Justin.He@stripped +2 -0
Bug#21440 5.1 API connecting to 5.0 cluster doesn't get any error(miss hb in cluster log)
ndb/src/common/util/version.c@stripped, 2007-03-23 18:49:54+08:00, Justin.He@stripped +8 -2
correct the version compatibility check
ndb/src/mgmsrv/Services.cpp@stripped, 2007-03-23 18:49:54+08:00, Justin.He@stripped +10 -12
add warning info if version is incompatible
# 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: Justin.He
# Host: dev3-240.dev.cn.tlan
# Root: /home/justin.he/mysql/mysql-5.0/bug21440-5.0-ndb-bj
--- 1.24/ndb/src/common/util/version.c 2007-03-23 18:50:05 +08:00
+++ 1.25/ndb/src/common/util/version.c 2007-03-23 18:50:05 +08:00
@@ -91,6 +91,8 @@
#ifndef TEST_VERSION
struct NdbUpGradeCompatible ndbCompatibleTable_full[] = {
+ { MAKE_VERSION(5,1,NDB_VERSION_BUILD), MAKE_VERSION(5,1,12), UG_Range},
+ { MAKE_VERSION(5,1,11), MAKE_VERSION(5,1,3), UG_Range},
{ MAKE_VERSION(5,0,NDB_VERSION_BUILD), MAKE_VERSION(5,0,12), UG_Range},
{ MAKE_VERSION(5,0,11), MAKE_VERSION(5,0,2), UG_Range},
{ MAKE_VERSION(4,1,NDB_VERSION_BUILD), MAKE_VERSION(4,1,15), UG_Range },
@@ -182,10 +184,14 @@
int
ndbCompatible(Uint32 ownVersion, Uint32 otherVersion, struct NdbUpGradeCompatible table[])
{
- if (otherVersion >= ownVersion) {
+ if (otherVersion > ownVersion) {
+ return 0;
+ }
+ else if (otherVersion == ownVersion) {
return 1;
}
- return ndbSearchUpgradeCompatibleTable(ownVersion, otherVersion, table);
+ else
+ return ndbSearchUpgradeCompatibleTable(ownVersion, otherVersion, table);
}
int
--- 1.77/ndb/src/mgmsrv/Services.cpp 2007-03-23 18:50:05 +08:00
+++ 1.78/ndb/src/mgmsrv/Services.cpp 2007-03-23 18:50:05 +08:00
@@ -447,6 +447,14 @@
return;
}
+ if (!compatible){
+ m_output->println(cmd);
+ m_output->println("result: incompatible version mgmt 0x%x and node 0x%x", NDB_VERSION, version);
+ m_output->println("");
+ g_eventLogger.warning("incompatible version mgmt 0x%x and node 0x%x", NDB_VERSION, version);
+ return;
+ }
+
struct sockaddr_in addr;
SOCKET_SIZE_TYPE addrlen= sizeof(addr);
int r = getpeername(m_socket, (struct sockaddr*)&addr, &addrlen);
@@ -498,16 +506,6 @@
}
}
-#if 0
- if (!compatible){
- m_output->println(cmd);
- m_output->println("result: incompatible version mgmt 0x%x and node 0x%x",
- NDB_VERSION, version);
- m_output->println("");
- return;
- }
-#endif
-
m_output->println(cmd);
m_output->println("nodeid: %u", tmp);
m_output->println("result: Ok");
@@ -556,9 +554,9 @@
if (!compatible){
m_output->println("get config");
- m_output->println("result: incompatible version mgmt 0x%x and node 0x%x",
- NDB_VERSION, version);
+ m_output->println("result: incompatible version mgmt 0x%x and node 0x%x", NDB_VERSION, version);
m_output->println("");
+ g_eventLogger.warning("incompatible version mgmt 0x%x and node 0x%x", NDB_VERSION, version);
return;
}
}
| Thread |
|---|
| • bk commit into 5.0 tree (Justin.He:1.2475) BUG#21440 | justin.he | 23 Mar |