summaryrefslogtreecommitdiff
path: root/ndb/src/mgmsrv/ConfigInfo.cpp
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-01-28 00:47:41 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2005-01-28 00:47:41 +0100
commitcca25e4d4903fbe1df3cd7251d9519c9c9fa376d (patch)
tree64b7118181c1242daeb2b9816bb749c9f50a9cf2 /ndb/src/mgmsrv/ConfigInfo.cpp
parent1c49d54894aec778efa3fef6da5ae992f21b8d1d (diff)
parentdf7bb879cdbbf61e4c879cc6f13126a0be69dff7 (diff)
downloadmariadb-git-cca25e4d4903fbe1df3cd7251d9519c9c9fa376d.tar.gz
Merge
ndb/include/Makefile.am: Auto merged ndb/include/mgmapi/mgmapi_config_parameters.h: Auto merged ndb/src/common/mgmcommon/IPCConfig.cpp: Auto merged ndb/src/common/transporter/TransporterRegistry.cpp: Auto merged ndb/src/kernel/vm/Configuration.cpp: Auto merged ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged ndb/tools/delete_all.cpp: Auto merged ndb/tools/desc.cpp: Auto merged ndb/tools/drop_index.cpp: Auto merged ndb/tools/drop_tab.cpp: Auto merged ndb/tools/listTables.cpp: Auto merged ndb/tools/restore/restore_main.cpp: Auto merged ndb/tools/select_all.cpp: Auto merged ndb/tools/select_count.cpp: Auto merged ndb/tools/waiter.cpp: Auto merged ndb/include/util/ndb_opts.h: SCCS merged ndb/src/mgmsrv/main.cpp: resolved merge conflict
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);
}