diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-09-01 00:13:01 +0200 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-09-01 00:13:01 +0200 |
commit | 92e2b9edb1660a2f9d7dcd7543fc5140abd3ff0d (patch) | |
tree | 40d41a24f3c7bca87ce6d2e5ac5ef8229f8ab767 | |
parent | fcc48eb33797374ff3dd7fe81c1963e0d0a017a1 (diff) | |
download | mariadb-git-92e2b9edb1660a2f9d7dcd7543fc5140abd3ff0d.tar.gz |
Bug #12043, do not core on misconfig unless debug compiled
-rw-r--r-- | ndb/src/mgmsrv/ConfigInfo.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp index bc078b711dc..cface035174 100644 --- a/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/ndb/src/mgmsrv/ConfigInfo.cpp @@ -2136,7 +2136,17 @@ const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo); /**************************************************************************** * Ctor ****************************************************************************/ -static void require(bool v) { if(!v) abort();} +static void require(bool v) +{ + if(!v) + { +#ifndef DBUG_OFF + abort(); +#else + exit(-1); +#endif + } +} ConfigInfo::ConfigInfo() : m_info(true), m_systemDefaults(true) @@ -2277,7 +2287,7 @@ ConfigInfo::ConfigInfo() ****************************************************************************/ inline void warning(const char * src, const char * arg){ ndbout << "Illegal call to ConfigInfo::" << src << "() - " << arg << endl; - abort(); + require(false); } const Properties * @@ -3394,7 +3404,7 @@ fixDepricated(InitConfigFileParser::Context & ctx, const char * data){ } case PropertiesType_Properties: default: - abort(); + ::require(false); } } return true; @@ -3406,7 +3416,7 @@ static bool saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){ const Properties * sec; if(!ctx.m_currentInfo->get(ctx.fname, &sec)){ - abort(); + require(false); return false; } @@ -3477,7 +3487,7 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){ break; } default: - abort(); + require(false); } require(ok); } |