mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Bug #13611 double [TCP DEFAULT] in config.ini crashes ndb_mgmd
- Added error printout and nice exit for duplicate default sections
This commit is contained in:
parent
da625424e0
commit
e8f291f52b
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue