List:Commits« Previous MessageNext Message »
From:jhe Date:August 14 2006 12:17pm
Subject:bk commit into 5.0 tree (Justin.He:1.2252) BUG#19045
View as plain text  
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-14 18:17:13+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-14 18:17:08+08:00,
Justin.He@stripped +9 -2
    add maximum nodes number judging in transformNode

  ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-08-14 18:17:08+08:00,
Justin.He@stripped +4 -1
    if config file is not null, display 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-14 18:17:27 +08:00
+++ 1.80/ndb/src/mgmsrv/ConfigInfo.cpp	2006-08-14 18:17:27 +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);
 
@@ -3495,11 +3502,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-14 18:17:27 +08:00
+++ 1.103/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-08-14 18:17:27 +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);
     }
   }
Thread
bk commit into 5.0 tree (Justin.He:1.2252) BUG#19045jhe14 Aug