summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-10-10 12:27:48 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2005-10-10 12:27:48 +0200
commit2b603902ccbafa97cdf9c591cbb1f4ce0e57f541 (patch)
treec7d6c5aa3043e78963230e9d4f793b5a36255270 /ndb
parent0c16a7ccc7354ef197472a9cdde182512c88dfe7 (diff)
downloadmariadb-git-2b603902ccbafa97cdf9c591cbb1f4ce0e57f541.tar.gz
Bug #13611 double [TCP DEFAULT] in config.ini crashes ndb_mgmd
- Added error printout and nice exit for duplicate default sections
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/mgmsrv/InitConfigFileParser.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ndb/src/mgmsrv/InitConfigFileParser.cpp b/ndb/src/mgmsrv/InitConfigFileParser.cpp
index e0163b966c0..b2c290df9fc 100644
--- a/ndb/src/mgmsrv/InitConfigFileParser.cpp
+++ b/ndb/src/mgmsrv/InitConfigFileParser.cpp
@@ -558,8 +558,12 @@ InitConfigFileParser::storeSection(Context& ctx){
}
}
}
- if(ctx.type == InitConfigFileParser::DefaultSection)
- require(ctx.m_defaults->put(ctx.pname, ctx.m_currentSection));
+ if(ctx.type == InitConfigFileParser::DefaultSection &&
+ !ctx.m_defaults->put(ctx.pname, ctx.m_currentSection))
+ {
+ ctx.reportError("Duplicate default section not allowed");
+ return false;
+ }
if(ctx.type == InitConfigFileParser::Section)
require(ctx.m_config->put(ctx.pname, ctx.m_currentSection));
delete ctx.m_currentSection; ctx.m_currentSection = NULL;