Commit 3a3e2c79 authored by unknown's avatar unknown

BUG#28298 Node Id larger than MAX_NDB_NODES in config file doesn't generate error


ndb/include/kernel/ndb_limits.h:
  1) define a macro MAX_DATA_NODE_ID to set the max ID of data nodes to be MAX_NDB_NODES - 1
  2) define a macro MAX_NODES_ID to set the max ID of API and MGM to be MAX_NODES -1
ndb/src/mgmsrv/ConfigInfo.cpp:
  1) replace MAX_NODES with MAX_DATA_NODE_ID (= MAX_NDB_NODES - 1)  when the NodeId represents data nodes.
  2) replace MAX_NODES with MAX_NODES_ID (= MAX_NODES -1) when the NodeId represents API or MGM nodes.
parent ebcbfef8
......@@ -27,6 +27,17 @@
#define MAX_NDB_NODES 49
#define MAX_NODES 64
/**************************************************************************
* IT SHOULD BE (MAX_NDB_NODES - 1).
* WHEN MAX_NDB_NODE IS CHANGED, IT SHOULD BE CHANGED ALSO
**************************************************************************/
#define MAX_DATA_NODE_ID 48
/**************************************************************************
* IT SHOULD BE (MAX_NODES - 1).
* WHEN MAX_NODES IS CHANGED, IT SHOULD BE CHANGED ALSO
**************************************************************************/
#define MAX_NODES_ID 63
/**
* MAX_API_NODES = MAX_NODES - No of NDB Nodes in use
*/
......
......@@ -398,7 +398,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
STR_VALUE(MAX_DATA_NODE_ID) },
{
CFG_NODE_ID,
......@@ -410,7 +410,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
STR_VALUE(MAX_DATA_NODE_ID) },
{
KEY_INTERNAL,
......@@ -1261,7 +1261,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
STR_VALUE(MAX_NODES_ID) },
{
CFG_NODE_ID,
......@@ -1273,7 +1273,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
STR_VALUE(MAX_NODES_ID) },
{
KEY_INTERNAL,
......@@ -1404,7 +1404,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
STR_VALUE(MAX_NODES_ID) },
{
CFG_NODE_ID,
......@@ -1416,7 +1416,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
STR_VALUE(MAX_NODES_ID) },
{
CFG_LOG_DESTINATION,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment