List:Commits« Previous MessageNext Message »
From:gni Date:July 25 2007 9:29am
Subject:bk commit into 5.0 tree (gni:1.2512) BUG#28298
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gni. When gni 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, 2007-07-25 15:29:12+08:00, gni@stripped +1 -0
  BUG#28298 Node Id larger than MAX_NDB_NODES in config file doesn't generate error

  ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-07-25 15:29:09+08:00, gni@stripped
+17 -6
    1) In order to transform a cacluating format into a string, add the
transformIntToStr() function
    2) set the max ID of data nodes to be MAX_NDB_NODES - 1
    3) set the max ID of API and MGM to be MAX_NODES -1

# 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:	gni
# Host:	dev3-221.dev.cn.tlan
# Root:	/home/ngb/mysql/mysql-5.0/bug28298

--- 1.86/ndb/src/mgmsrv/ConfigInfo.cpp	2007-07-25 15:29:17 +08:00
+++ 1.87/ndb/src/mgmsrv/ConfigInfo.cpp	2007-07-25 15:29:17 +08:00
@@ -96,6 +96,7 @@
 static bool fixBackupDataDir(InitConfigFileParser::Context & ctx, const char * data);
 static bool fixShmUniqueId(InitConfigFileParser::Context & ctx, const char * data);
 static bool checkLocalhostHostnameMix(InitConfigFileParser::Context & ctx, const char
* data);
+static char * transformIntToStr(Uint32 Id); 
 
 const ConfigInfo::SectionRule 
 ConfigInfo::m_SectionRules[] = {
@@ -398,7 +399,7 @@
     ConfigInfo::CI_INT,
     MANDATORY,
     "1",
-    STR_VALUE(MAX_NODES) },
+    transformIntToStr(MAX_NDB_NODES - 1) },
 
   {
     CFG_NODE_ID,
@@ -410,7 +411,7 @@
     ConfigInfo::CI_INT,
     MANDATORY,
     "1",
-    STR_VALUE(MAX_NODES) },
+    transformIntToStr(MAX_NDB_NODES - 1) },
 
   {
     KEY_INTERNAL,
@@ -1261,7 +1262,7 @@
     ConfigInfo::CI_INT,
     MANDATORY,
     "1",
-    STR_VALUE(MAX_NODES) },
+    transformIntToStr(MAX_NODES - 1) },
 
   {
     CFG_NODE_ID,
@@ -1273,7 +1274,7 @@
     ConfigInfo::CI_INT,
     MANDATORY,
     "1",
-    STR_VALUE(MAX_NODES) },
+    transformIntToStr(MAX_NODES - 1) },
 
   {
     KEY_INTERNAL,
@@ -1404,7 +1405,7 @@
     ConfigInfo::CI_INT,
     MANDATORY,
     "1",
-    STR_VALUE(MAX_NODES) },
+    transformIntToStr(MAX_NODES - 1) },
   
   {
     CFG_NODE_ID,
@@ -1416,7 +1417,7 @@
     ConfigInfo::CI_INT,
     MANDATORY,
     "1",
-    STR_VALUE(MAX_NODES) },
+    transformIntToStr(MAX_NODES - 1) },
   
   {
     CFG_LOG_DESTINATION,
@@ -3771,3 +3772,13 @@
 }
 
 template class Vector<ConfigInfo::ConfigRuleSection>;
+
+char * 
+transformIntToStr(Uint32 Id)
+{
+  static char buf[20];
+
+  bzero(buf,20);
+  snprintf(buf,20, "%u",Id);
+  return buf; 
+}
Thread
bk commit into 5.0 tree (gni:1.2512) BUG#28298gni25 Jul