From: Date: August 11 2006 7:53am Subject: bk commit into 5.0 tree (justin.he:1.2246) BUG#19045 List-Archive: http://lists.mysql.com/commits/10294 X-Bug: 19045 Message-Id: <200608110553.k7B5r7wp008214@qa3-104.qa.cn.tlan> Below is the list of changes that have just been committed into a local 5.0 repository of justin.he. When justin.he does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-08-11 13:52:54+08:00, justin.he@stripped +2 -0 BUG#19045, No meaningfull error message when defining too many nodes ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2006-08-11 13:52:45+08:00, justin.he@stripped +16 -7 add judgement of maximum id num in transformNode; change ctx.fname to its alias name so that is clearly meaningful in transform; ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-08-11 13:52:45+08:00, justin.he@stripped +4 -1 if config_filename of ndb cluster is not null, show it # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: justin.he # Host: qa3-104.qa.cn.tlan # Root: /mnt/sda7/justin.he/mysql/bug19045-5.0 --- 1.79/ndb/src/mgmsrv/ConfigInfo.cpp 2006-08-11 13:53:10 +08:00 +++ 1.80/ndb/src/mgmsrv/ConfigInfo.cpp 2006-08-11 13:53:10 +08:00 @@ -2604,6 +2604,13 @@ 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); @@ -3320,16 +3327,18 @@ ctx.fname, ctx.m_sectionLineno); return false; } + Uint64 oldVal; require(ctx.m_currentSection->get(oldName, &oldVal)); Uint64 newVal = (Uint64)((Int64)oldVal * mul + add); + if(!ctx.m_info->verify(ctx.m_currentInfo, newName, newVal)){ - ctx.reportError("Unable to handle deprication, new value not within bounds" - "%s %s - [%s] starting at line: %d", - oldName, newName, - ctx.fname, ctx.m_sectionLineno); - return false; + ctx.reportError("Unable to handle deprication, new value not within bounds" + "%s %s - [%s] starting at line: %d", + oldName, newName, + ConfigInfo::nameToAlias(ctx.fname), ctx.m_sectionLineno); + return false; } if(newType == ConfigInfo::CI_INT || newType == ConfigInfo::CI_BOOL){ @@ -3495,11 +3504,11 @@ 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)) { --- 1.102/ndb/src/mgmsrv/MgmtSrvr.cpp 2006-08-11 13:53:10 +08:00 +++ 1.103/ndb/src/mgmsrv/MgmtSrvr.cpp 2006-08-11 13:53:10 +08:00 @@ -450,7 +450,10 @@ // 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); } }