summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <dli/root@dev3-76.dev.cn.tlan>2006-08-15 19:14:12 +0800
committerunknown <dli/root@dev3-76.dev.cn.tlan>2006-08-15 19:14:12 +0800
commite757e5ad992b34efe390702e87be7dd325821ec1 (patch)
tree33316f2c3f0abc74002007b6e8913de4ed2e05e3 /ndb
parentf32014a917a423a8505230be1d9ad8c71fbfc2de (diff)
parent25a7bd9ea5a1e200b043e694ee3352ea5844339d (diff)
downloadmariadb-git-e757e5ad992b34efe390702e87be7dd325821ec1.tar.gz
Merge dli@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into dev3-76.dev.cn.tlan:/home/lisj/mysql/mysql-5.0/mysql-5.0-ndb-bj ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.cpp11
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp5
2 files changed, 13 insertions, 3 deletions
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index ab4f2b413b3..d4e72a7ff1d 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -2604,6 +2604,13 @@ transformNode(InitConfigFileParser::Context & ctx, const char * data){
return false;
}
+ if(id >= MAX_NODES)
+ {
+ ctx.reportError("too many nodes configured, only up to %d nodes supported.",
+ MAX_NODES);
+ return false;
+ }
+
// next node id _always_ next numbers after last used id
ctx.m_userProperties.put("NextNodeId", id+1, true);
@@ -3495,11 +3502,11 @@ sanity_checks(Vector<ConfigInfo::ConfigRuleSection>&sections,
Uint32 mgm_nodes = 0;
Uint32 api_nodes = 0;
if (!ctx.m_userProperties.get("DB", &db_nodes)) {
- ctx.reportError("At least one database node should be defined in config file");
+ ctx.reportError("At least one database node (ndbd) should be defined in config file");
return false;
}
if (!ctx.m_userProperties.get("MGM", &mgm_nodes)) {
- ctx.reportError("At least one management server node should be defined in config file");
+ ctx.reportError("At least one management server node (ndb_mgmd) should be defined in config file");
return false;
}
if (!ctx.m_userProperties.get("API", &api_nodes)) {
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 5fabb84adb7..9fe649f3baf 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -449,7 +449,10 @@ MgmtSrvr::MgmtSrvr(SocketServer *socket_server,
// read config locally
_config= readConfig();
if (_config == 0) {
- ndbout << "Unable to read config file" << endl;
+ if (config_filename != NULL)
+ ndbout << "Invalid configuration file: " << config_filename << endl;
+ else
+ ndbout << "Invalid configuration file" << endl;
exit(-1);
}
}