BUG#27207 Missing parameters in [TCP] seciton cause ndb_Mgmd start failure This patch fixes [TCP] SendBufferMemory= 2M and things like: [TCP] NodeId1= NodeId2= 12 (which has caused a segfault) Other tests should be done around here... I'm sure there's a few other things can cause bad failure modes on incorrect config in some of the less used parts. Index: ndb-work/storage/ndb/src/mgmsrv/ConfigInfo.cpp =================================================================== --- ndb-work.orig/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-04-24 07:35:09.670749250 -0700 +++ ndb-work/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-04-24 07:55:27.554862250 -0700 @@ -2889,7 +2889,13 @@ static bool fixNodeId(InitConfigFilePars char buf[] = "NodeIdX"; buf[6] = data[sizeof("NodeI")]; char sysbuf[] = "SystemX"; sysbuf[6] = data[sizeof("NodeI")]; const char* nodeId; - require(ctx.m_currentSection->get(buf, &nodeId)); + if(!ctx.m_currentSection->get(buf, &nodeId)) + { + ctx.reportError("Mandatory parameter %s missing from section " + "[%s] starting at line: %d", + buf, ctx.fname, ctx.m_sectionLineno); + return false; + } char tmpLine[MAX_LINE_LENGTH]; strncpy(tmpLine, nodeId, MAX_LINE_LENGTH); @@ -2897,6 +2903,14 @@ static bool fixNodeId(InitConfigFilePars char* token2 = strtok(NULL, "."); Uint32 id; + if(!token1) + { + ctx.reportError("Value for mandatory parameter %s missing from section " + "[%s] starting at line: %d", + buf, ctx.fname, ctx.m_sectionLineno); + return false; + } + if (token2 == NULL) { // Only a number given errno = 0; char* p;