summaryrefslogtreecommitdiff
path: root/ndb/src/mgmsrv/ConfigInfo.cpp
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2005-01-28 00:47:41 +0100
committertomas@poseidon.ndb.mysql.com <>2005-01-28 00:47:41 +0100
commite8090fc224542975e162705d1eb5de8e252fed51 (patch)
tree64b7118181c1242daeb2b9816bb749c9f50a9cf2 /ndb/src/mgmsrv/ConfigInfo.cpp
parent5014402000ee7b2c85b9adb112d1bc40b4d3f681 (diff)
parent732d1a5e81037407067c345f5f6f33ee95210e6e (diff)
downloadmariadb-git-e8090fc224542975e162705d1eb5de8e252fed51.tar.gz
Merge
Diffstat (limited to 'ndb/src/mgmsrv/ConfigInfo.cpp')
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.cpp42
1 files changed, 32 insertions, 10 deletions
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index ed49a551b09..a9c53f606e2 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
+#include <ndb_opt_defaults.h>
#include <NdbTCP.h>
#include "ConfigInfo.hpp"
@@ -1766,6 +1767,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
STR_VALUE(MAX_INT_RNIL) },
{
+ CFG_SHM_SIGNUM,
+ "Signum",
+ "SHM",
+ "Signum to be used for signalling",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ UNDEFINED,
+ "0",
+ STR_VALUE(MAX_INT_RNIL) },
+
+ {
CFG_CONNECTION_NODE_1,
"NodeId1",
"SHM",
@@ -3190,18 +3203,27 @@ bool
fixShmKey(InitConfigFileParser::Context & ctx, const char *)
{
DBUG_ENTER("fixShmKey");
- Uint32 id1= 0, id2= 0, key= 0;
- require(ctx.m_currentSection->get("NodeId1", &id1));
- require(ctx.m_currentSection->get("NodeId2", &id2));
- if(ctx.m_currentSection->get("ShmKey", &key))
{
- DBUG_RETURN(true);
+ Uint32 signum;
+ if(!ctx.m_currentSection->get("Signum", &signum))
+ {
+ signum= OPT_NDB_SHM_SIGNUM_DEFAULT;
+ ctx.m_currentSection->put("Signum", signum);
+ DBUG_PRINT("info",("Added Signum=%u", signum));
+ }
+ }
+ {
+ Uint32 id1= 0, id2= 0, key= 0;
+ require(ctx.m_currentSection->get("NodeId1", &id1));
+ require(ctx.m_currentSection->get("NodeId2", &id2));
+ if(!ctx.m_currentSection->get("ShmKey", &key))
+ {
+ require(ctx.m_userProperties.get("ShmUniqueId", &key));
+ key= key << 16 | (id1 > id2 ? id1 << 8 | id2 : id2 << 8 | id1);
+ ctx.m_currentSection->put("ShmKey", key);
+ DBUG_PRINT("info",("Added ShmKey=0x%x", key));
+ }
}
-
- require(ctx.m_userProperties.get("ShmUniqueId", &key));
- key= key << 16 | (id1 > id2 ? id1 << 8 | id2 : id2 << 8 | id1);
- ctx.m_currentSection->put("ShmKey", key);
- DBUG_PRINT("info",("Added ShmKey=0x%x", key));
DBUG_RETURN(true);
}