summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <lzhou/zhl@dev3-63.dev.cn.tlan>2006-12-15 17:49:13 +0000
committerunknown <lzhou/zhl@dev3-63.dev.cn.tlan>2006-12-15 17:49:13 +0000
commita75003287d9f3b7ad5141f8f04525d98ac87a18b (patch)
tree58ce4298d7fc01e53d3aa6c2abdf09ae718e480f /storage
parentd761a1456fa9b92bb35164a604ad5d213cc90c8f (diff)
downloadmariadb-git-a75003287d9f3b7ad5141f8f04525d98ac87a18b.tar.gz
BUG#22261 remove global variable global_mgmt_server_check from ClusterMgr
storage/ndb/src/mgmsrv/main.cpp: Remove global variable global_mgmt_server_check storage/ndb/src/ndbapi/ClusterMgr.cpp: Change another method to test whether the node is mgmsrv or not
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/mgmsrv/main.cpp4
-rw-r--r--storage/ndb/src/ndbapi/ClusterMgr.cpp4
2 files changed, 1 insertions, 7 deletions
diff --git a/storage/ndb/src/mgmsrv/main.cpp b/storage/ndb/src/mgmsrv/main.cpp
index dd7f4680dff..3c843b52567 100644
--- a/storage/ndb/src/mgmsrv/main.cpp
+++ b/storage/ndb/src/mgmsrv/main.cpp
@@ -132,8 +132,6 @@ bool g_StopServer;
bool g_RestartServer;
extern EventLogger g_eventLogger;
-extern int global_mgmt_server_check;
-
enum ndb_mgmd_options {
OPT_INTERACTIVE = NDB_STD_OPTIONS_LAST,
OPT_NO_NODEID_CHECKS,
@@ -208,8 +206,6 @@ int main(int argc, char** argv)
start:
glob= new MgmGlobals;
- global_mgmt_server_check = 1;
-
if (opt_interactive ||
opt_non_interactive ||
g_print_full_config) {
diff --git a/storage/ndb/src/ndbapi/ClusterMgr.cpp b/storage/ndb/src/ndbapi/ClusterMgr.cpp
index ef0bf51cc2b..47ef41043bd 100644
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp
@@ -361,8 +361,6 @@ ClusterMgr::execAPI_REGREQ(const Uint32 * theData){
theFacade.sendSignalUnCond(&signal, nodeId);
}
-int global_mgmt_server_check = 0; // set to one in mgmtsrvr main;
-
void
ClusterMgr::execAPI_REGCONF(const Uint32 * theData){
const ApiRegConf * const apiRegConf = (ApiRegConf *)&theData[0];
@@ -380,7 +378,7 @@ ClusterMgr::execAPI_REGCONF(const Uint32 * theData){
if(node.m_info.m_version != apiRegConf->version){
node.m_info.m_version = apiRegConf->version;
- if (global_mgmt_server_check == 1)
+ if(theNodes[theFacade.ownId()].m_info.m_type == NodeInfo::MGM)
node.compatible = ndbCompatible_mgmt_ndb(NDB_VERSION,
node.m_info.m_version);
else