Commit a1e0046c authored by tomas@poseidon.(none)'s avatar tomas@poseidon.(none)

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.(none):/home/tomas/mysql-4.1
parents b1847f47 91f10a99
...@@ -1515,6 +1515,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ...@@ -1515,6 +1515,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation], --with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
[ndb_docs="$withval"], [ndb_docs="$withval"],
[ndb_docs=no]) [ndb_docs=no])
AC_ARG_WITH([ndb-port-base],
[
--with-ndb-port-base Base port for NDB Cluster],
[ndb_port_base="$withval"],
[ndb_port_base="default"])
AC_MSG_CHECKING([for NDB Cluster options]) AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([]) AC_MSG_RESULT([])
......
...@@ -389,8 +389,6 @@ then ...@@ -389,8 +389,6 @@ then
# Disable exceptions as they seams to create problems with gcc and threads. # Disable exceptions as they seams to create problems with gcc and threads.
# mysqld doesn't use run-time-type-checking, so we disable it. # mysqld doesn't use run-time-type-checking, so we disable it.
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti" CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
# ndb cannot be compiled with -fno-implicit-templaces
ndb_cxxflags_fix="$ndb_cxxflags_fix -fimplicit-templates"
# If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux, # If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux,
# we will gets some problems when linking static programs. # we will gets some problems when linking static programs.
...@@ -2985,6 +2983,13 @@ then ...@@ -2985,6 +2983,13 @@ then
AC_SUBST([NDB_DEFS]) AC_SUBST([NDB_DEFS])
AC_SUBST([ndb_cxxflags_fix]) AC_SUBST([ndb_cxxflags_fix])
if test X"$ndb_port_base" = Xdefault
then
ndb_port_base="2200"
fi
AC_SUBST([ndb_port_base])
ndb_transporter_opt_objs="" ndb_transporter_opt_objs=""
if test X"$have_ndb_shm" = Xyes if test X"$have_ndb_shm" = Xyes
then then
......
...@@ -7,19 +7,11 @@ Diskless: CHOOSE_Diskless ...@@ -7,19 +7,11 @@ Diskless: CHOOSE_Diskless
TimeBetweenWatchDogCheck: 30000 TimeBetweenWatchDogCheck: 30000
FileSystemPath: CHOOSE_FILESYSTEM FileSystemPath: CHOOSE_FILESYSTEM
[COMPUTER]
Id: 1
HostName: CHOOSE_HOSTNAME_1
[COMPUTER]
Id: 2
HostName: CHOOSE_HOSTNAME_2
[DB] [DB]
ExecuteOnComputer: 1 HostName: CHOOSE_HOSTNAME_1
[DB] [DB]
ExecuteOnComputer: 2 HostName: CHOOSE_HOSTNAME_2
[MGM] [MGM]
PortNumber: CHOOSE_PORT_MGM PortNumber: CHOOSE_PORT_MGM
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#define NDBGLOBAL_H #define NDBGLOBAL_H
#include <my_global.h> #include <my_global.h>
#define NDB_BASE_PORT 2200
/** signal & SIG_PIPE */ /** signal & SIG_PIPE */
#include <my_alarm.h> #include <my_alarm.h>
......
...@@ -18,10 +18,15 @@ ...@@ -18,10 +18,15 @@
#include "ConfigInfo.hpp" #include "ConfigInfo.hpp"
#include <mgmapi_config_parameters.h> #include <mgmapi_config_parameters.h>
#include <ndb_limits.h> #include <ndb_limits.h>
#include "InitConfigFileParser.hpp"
#define MAX_LINE_LENGTH 255 #define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0 #define KEY_INTERNAL 0
#define MAX_INT_RNIL (RNIL - 1)
#define RNIL_STRING "0xffffff00"
#define MAX_INT_RNIL_STRING "0xfffffeff"
#define MAX_NODES_STRING "63"
/**************************************************************************** /****************************************************************************
* Section names * Section names
****************************************************************************/ ****************************************************************************/
...@@ -207,6 +212,7 @@ const DepricationTransform f_deprication[] = { ...@@ -207,6 +212,7 @@ const DepricationTransform f_deprication[] = {
* Parameters used under development should be marked "NOTIMPLEMENTED" * Parameters used under development should be marked "NOTIMPLEMENTED"
* ******************************************************************* * *******************************************************************
*/ */
const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
/**************************************************************************** /****************************************************************************
...@@ -232,8 +238,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -232,8 +238,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
0 },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -244,8 +249,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -244,8 +249,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
MAX_INT_RNIL },
/**************************************************************************** /****************************************************************************
* SYSTEM * SYSTEM
...@@ -258,9 +262,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -258,9 +262,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
CFG_SECTION_SYSTEM, (const char *)CFG_SECTION_SYSTEM,
0, 0, 0 },
0 },
{ {
CFG_SYS_NAME, CFG_SYS_NAME,
...@@ -271,8 +274,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -271,8 +274,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
0 },
{ {
CFG_SYS_REPLICATION_ROLE, CFG_SYS_REPLICATION_ROLE,
...@@ -283,8 +285,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -283,8 +285,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
0 },
{ {
CFG_SYS_PRIMARY_MGM_NODE, CFG_SYS_PRIMARY_MGM_NODE,
...@@ -294,9 +295,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -294,9 +295,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_SYS_CONFIG_GENERATION, CFG_SYS_CONFIG_GENERATION,
...@@ -306,9 +307,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -306,9 +307,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
/*************************************************************************** /***************************************************************************
* DB * DB
...@@ -321,7 +322,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -321,7 +322,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
NODE_TYPE_DB, (const char *)NODE_TYPE_DB,
0, 0 0, 0
}, },
...@@ -334,8 +335,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -334,8 +335,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_SYSTEM, CFG_NODE_SYSTEM,
...@@ -346,8 +346,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -346,8 +346,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_ID, CFG_NODE_ID,
...@@ -358,8 +357,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -358,8 +357,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
1, "1",
(MAX_NODES - 1) }, MAX_NODES_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -370,8 +369,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -370,8 +369,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
UNDEFINED, UNDEFINED,
1, "1",
65535 }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_REPLICAS, CFG_DB_NO_REPLICAS,
...@@ -382,8 +381,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -382,8 +381,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
1, "1",
4 }, "4" },
{ {
CFG_DB_NO_ATTRIBUTES, CFG_DB_NO_ATTRIBUTES,
...@@ -393,9 +392,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -393,9 +392,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1000, "1000",
32, "32",
MAX_INT_RNIL/16 }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_TABLES, CFG_DB_NO_TABLES,
...@@ -405,9 +404,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -405,9 +404,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
128, "128",
8, "8",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_INDEXES, CFG_DB_NO_INDEXES,
...@@ -417,9 +416,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -417,9 +416,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
128, "128",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_INDEX_OPS, CFG_DB_NO_INDEX_OPS,
...@@ -429,9 +428,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -429,9 +428,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
8192, "8K",
0, "0",
MAX_INT_RNIL MAX_INT_RNIL_STRING
}, },
{ {
...@@ -442,9 +441,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -442,9 +441,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
768, "768",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_TRIGGER_OPS, CFG_DB_NO_TRIGGER_OPS,
...@@ -454,9 +453,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -454,9 +453,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
4000, "4000",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -466,9 +465,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -466,9 +465,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_DB_NO_SAVE_MSGS, CFG_DB_NO_SAVE_MSGS,
...@@ -478,9 +476,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -478,9 +476,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
25, "25",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_MEMLOCK, CFG_DB_MEMLOCK,
...@@ -490,9 +488,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -490,9 +488,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::BOOL, ConfigInfo::BOOL,
false, "false",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_DB_WATCHDOG_INTERVAL, CFG_DB_WATCHDOG_INTERVAL,
...@@ -502,9 +500,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -502,9 +500,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
6000, "6000",
70, "70",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_STOP_ON_ERROR, CFG_DB_STOP_ON_ERROR,
...@@ -514,9 +512,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -514,9 +512,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::BOOL, ConfigInfo::BOOL,
true, "true",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_DB_STOP_ON_ERROR_INSERT, CFG_DB_STOP_ON_ERROR_INSERT,
...@@ -526,9 +524,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -526,9 +524,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::INTERNAL, ConfigInfo::INTERNAL,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
2, "2",
0, "0",
4 }, "4" },
{ {
CFG_DB_NO_OPS, CFG_DB_NO_OPS,
...@@ -538,9 +536,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -538,9 +536,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
32768, "32K",
32, "32",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_TRANSACTIONS, CFG_DB_NO_TRANSACTIONS,
...@@ -550,9 +548,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -550,9 +548,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
4096, "4096",
32, "32",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_NO_SCANS, CFG_DB_NO_SCANS,
...@@ -562,9 +560,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -562,9 +560,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
256, "256",
2, "2",
500 }, "500" },
{ {
CFG_DB_TRANS_BUFFER_MEM, CFG_DB_TRANS_BUFFER_MEM,
...@@ -574,9 +572,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -574,9 +572,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
(1024 * 1024), "1M",
1024, "1K",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_INDEX_MEM, CFG_DB_INDEX_MEM,
...@@ -586,9 +584,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -586,9 +584,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT64, ConfigInfo::INT64,
3 * 1024 * 8192, "18M",
128 * 8192, "1M",
((Uint64)MAX_INT_RNIL) * ((Uint64)8192) }, "1024G" },
{ {
CFG_DB_DATA_MEM, CFG_DB_DATA_MEM,
...@@ -598,9 +596,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -598,9 +596,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT64, ConfigInfo::INT64,
10 * 1024 * 8192, "80M",
128 * 8192, "1M",
((Uint64)MAX_INT_RNIL) * ((Uint64)8192) }, "1024G" },
{ {
CFG_DB_START_PARTIAL_TIMEOUT, CFG_DB_START_PARTIAL_TIMEOUT,
...@@ -610,9 +608,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -610,9 +608,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
30000, "30000",
0, "0",
~0 }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_START_PARTITION_TIMEOUT, CFG_DB_START_PARTITION_TIMEOUT,
...@@ -622,9 +620,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -622,9 +620,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
60000, "60000",
0, "0",
~0 }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_START_FAILURE_TIMEOUT, CFG_DB_START_FAILURE_TIMEOUT,
...@@ -634,9 +632,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -634,9 +632,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
~0 }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_HEARTBEAT_INTERVAL, CFG_DB_HEARTBEAT_INTERVAL,
...@@ -646,9 +644,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -646,9 +644,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
1500, "1500",
10, "10",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_API_HEARTBEAT_INTERVAL, CFG_DB_API_HEARTBEAT_INTERVAL,
...@@ -658,9 +656,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -658,9 +656,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
1500, "1500",
100, "100",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_LCP_INTERVAL, CFG_DB_LCP_INTERVAL,
...@@ -670,9 +668,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -670,9 +668,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
20, "20",
0, "0",
31 }, "31" },
{ {
CFG_DB_GCP_INTERVAL, CFG_DB_GCP_INTERVAL,
...@@ -682,9 +680,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -682,9 +680,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
2000, "2000",
10, "10",
32000 }, "32000" },
{ {
CFG_DB_NO_REDOLOG_FILES, CFG_DB_NO_REDOLOG_FILES,
...@@ -694,9 +692,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -694,9 +692,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
8, "8",
1, "1",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -706,9 +704,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -706,9 +704,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
40, "40",
20, "20",
256 }, "256" },
{ {
...@@ -719,9 +717,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -719,9 +717,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
1000, "1000",
1000, "1000",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_TRANSACTION_INACTIVE_TIMEOUT, CFG_DB_TRANSACTION_INACTIVE_TIMEOUT,
...@@ -735,9 +733,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -735,9 +733,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
MAX_INT_RNIL, MAX_INT_RNIL_STRING,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT, CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT,
...@@ -750,9 +748,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -750,9 +748,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
1200, "1200",
50, "50",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -762,9 +760,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -762,9 +760,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
40, "40",
1, "1",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -774,9 +772,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -774,9 +772,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
40, "40",
1, "1",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -786,9 +784,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -786,9 +784,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
20, "20",
1, "1",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -798,9 +796,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -798,9 +796,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
20, "20",
1, "1",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
...@@ -811,9 +809,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -811,9 +809,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::BOOL, ConfigInfo::BOOL,
0, "false",
0, "false",
1}, "true"},
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -823,9 +821,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -823,9 +821,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::DEPRICATED, ConfigInfo::DEPRICATED,
true, true,
ConfigInfo::BOOL, ConfigInfo::BOOL,
0, "false",
0, "false",
1}, "true"},
...@@ -837,9 +835,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -837,9 +835,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
3000, "3000",
10, "10",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_FILESYSTEM_PATH, CFG_DB_FILESYSTEM_PATH,
...@@ -849,9 +847,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -849,9 +847,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, DATADIR,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_LOGLEVEL_STARTUP, CFG_LOGLEVEL_STARTUP,
...@@ -861,9 +858,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -861,9 +858,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1, "1",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_SHUTDOWN, CFG_LOGLEVEL_SHUTDOWN,
...@@ -873,9 +870,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -873,9 +870,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_STATISTICS, CFG_LOGLEVEL_STATISTICS,
...@@ -885,9 +882,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -885,9 +882,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_CHECKPOINT, CFG_LOGLEVEL_CHECKPOINT,
...@@ -897,9 +894,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -897,9 +894,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_NODERESTART, CFG_LOGLEVEL_NODERESTART,
...@@ -909,9 +906,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -909,9 +906,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_CONNECTION, CFG_LOGLEVEL_CONNECTION,
...@@ -921,9 +918,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -921,9 +918,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_ERROR, CFG_LOGLEVEL_ERROR,
...@@ -933,9 +930,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -933,9 +930,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
{ {
CFG_LOGLEVEL_INFO, CFG_LOGLEVEL_INFO,
...@@ -945,9 +942,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -945,9 +942,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
15 }, "15" },
/** /**
* Backup * Backup
...@@ -960,9 +957,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -960,9 +957,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::NOTIMPLEMENTED, ConfigInfo::NOTIMPLEMENTED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1, "1",
1, "1",
1 }, "1" },
{ {
CFG_DB_BACKUP_MEM, CFG_DB_BACKUP_MEM,
...@@ -972,9 +969,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -972,9 +969,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
(2 * 1024 * 1024) + (2 * 1024 * 1024), // sum of BackupDataBufferSize and BackupLogBufferSize "4M", // sum of BackupDataBufferSize and BackupLogBufferSize
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_BACKUP_DATA_BUFFER_MEM, CFG_DB_BACKUP_DATA_BUFFER_MEM,
...@@ -984,9 +981,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -984,9 +981,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
(2 * 1024 * 1024), // remember to change BackupMemory "2M", // remember to change BackupMemory
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_BACKUP_LOG_BUFFER_MEM, CFG_DB_BACKUP_LOG_BUFFER_MEM,
...@@ -996,9 +993,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -996,9 +993,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
(2 * 1024 * 1024), // remember to change BackupMemory "2M", // remember to change BackupMemory
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_DB_BACKUP_WRITE_SIZE, CFG_DB_BACKUP_WRITE_SIZE,
...@@ -1008,9 +1005,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1008,9 +1005,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
32768, "32K",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
/*************************************************************************** /***************************************************************************
* REP * REP
...@@ -1023,7 +1020,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1023,7 +1020,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
NODE_TYPE_REP, (const char *)NODE_TYPE_REP,
0, 0 0, 0
}, },
...@@ -1036,8 +1033,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1036,8 +1033,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_SYSTEM, CFG_NODE_SYSTEM,
...@@ -1048,8 +1044,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1048,8 +1044,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_ID, CFG_NODE_ID,
...@@ -1060,8 +1055,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1060,8 +1055,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
1, "1",
(MAX_NODES - 1) }, MAX_NODES_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -1072,8 +1067,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1072,8 +1067,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_REP_HEARTBEAT_INTERVAL, CFG_REP_HEARTBEAT_INTERVAL,
...@@ -1083,9 +1077,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1083,9 +1077,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
true, true,
ConfigInfo::INT, ConfigInfo::INT,
3000, "3000",
100, "100",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
/*************************************************************************** /***************************************************************************
* API * API
...@@ -1098,7 +1092,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1098,7 +1092,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
NODE_TYPE_API, (const char *)NODE_TYPE_API,
0, 0 0, 0
}, },
...@@ -1111,8 +1105,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1111,8 +1105,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_SYSTEM, CFG_NODE_SYSTEM,
...@@ -1123,8 +1116,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1123,8 +1116,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_ID, CFG_NODE_ID,
...@@ -1135,8 +1127,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1135,8 +1127,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
1, "1",
(MAX_NODES - 1) }, MAX_NODES_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -1146,9 +1138,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1146,9 +1138,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
0, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_ARBIT_RANK, CFG_NODE_ARBIT_RANK,
...@@ -1158,9 +1149,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1158,9 +1149,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
2 }, "2" },
{ {
CFG_NODE_ARBIT_DELAY, CFG_NODE_ARBIT_DELAY,
...@@ -1170,9 +1161,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1170,9 +1161,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
/**************************************************************************** /****************************************************************************
* MGM * MGM
...@@ -1185,7 +1176,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1185,7 +1176,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
NODE_TYPE_MGM, (const char *)NODE_TYPE_MGM,
0, 0 0, 0
}, },
...@@ -1198,8 +1189,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1198,8 +1189,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_SYSTEM, CFG_NODE_SYSTEM,
...@@ -1210,8 +1200,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1210,8 +1200,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_NODE_ID, CFG_NODE_ID,
...@@ -1222,8 +1211,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1222,8 +1211,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
1, "1",
(MAX_NODES - 1) }, MAX_NODES_STRING },
{ {
CFG_LOG_DESTINATION, CFG_LOG_DESTINATION,
...@@ -1234,8 +1223,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1234,8 +1223,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
0, 0,
0, 0, 0 },
MAX_INT_RNIL },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -1246,8 +1234,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1246,8 +1234,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
0, 0,
0, 0, 0 },
MAX_INT_RNIL },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -1257,9 +1244,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1257,9 +1244,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
100, "100",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_MGM_PORT, CFG_MGM_PORT,
...@@ -1270,8 +1257,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1270,8 +1257,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
NDB_BASE_PORT, NDB_BASE_PORT,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -1281,9 +1268,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1281,9 +1268,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
2199, "2199",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_NODE_ARBIT_RANK, CFG_NODE_ARBIT_RANK,
...@@ -1293,9 +1280,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1293,9 +1280,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1, "1",
0, "0",
2 }, "2" },
{ {
CFG_NODE_ARBIT_DELAY, CFG_NODE_ARBIT_DELAY,
...@@ -1305,9 +1292,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1305,9 +1292,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
0, "0",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
/**************************************************************************** /****************************************************************************
* TCP * TCP
...@@ -1320,7 +1307,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1320,7 +1307,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
CONNECTION_TYPE_TCP, (const char *)CONNECTION_TYPE_TCP,
0, 0 0, 0
}, },
...@@ -1333,8 +1320,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1333,8 +1320,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_TCP_HOSTNAME_2, CFG_TCP_HOSTNAME_2,
...@@ -1345,8 +1331,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1345,8 +1331,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_NODE_1, CFG_CONNECTION_NODE_1,
...@@ -1357,8 +1342,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1357,8 +1342,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_NODE_2, CFG_CONNECTION_NODE_2,
...@@ -1369,8 +1353,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1369,8 +1353,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_SEND_SIGNAL_ID, CFG_CONNECTION_SEND_SIGNAL_ID,
...@@ -1380,9 +1363,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1380,9 +1363,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
true, "true",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
...@@ -1393,9 +1376,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1393,9 +1376,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
false, "false",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_CONNECTION_SERVER_PORT, CFG_CONNECTION_SERVER_PORT,
...@@ -1406,8 +1389,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1406,8 +1389,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_TCP_SEND_BUFFER_SIZE, CFG_TCP_SEND_BUFFER_SIZE,
...@@ -1417,9 +1400,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1417,9 +1400,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
16 * 16384, "256K",
1 * 16384, "16K",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_TCP_RECEIVE_BUFFER_SIZE, CFG_TCP_RECEIVE_BUFFER_SIZE,
...@@ -1429,9 +1412,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1429,9 +1412,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
4 * 16384, "64K",
1 * 16384, "16K",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_TCP_PROXY, CFG_TCP_PROXY,
...@@ -1442,8 +1425,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1442,8 +1425,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
0 },
{ {
CFG_CONNECTION_NODE_1_SYSTEM, CFG_CONNECTION_NODE_1_SYSTEM,
...@@ -1454,8 +1436,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1454,8 +1436,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_NODE_2_SYSTEM, CFG_CONNECTION_NODE_2_SYSTEM,
...@@ -1466,8 +1447,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1466,8 +1447,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
/**************************************************************************** /****************************************************************************
...@@ -1481,9 +1461,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1481,9 +1461,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
CONNECTION_TYPE_SHM, (const char *)CONNECTION_TYPE_SHM,
0, 0 0, 0 },
},
{ {
CFG_CONNECTION_NODE_1, CFG_CONNECTION_NODE_1,
...@@ -1494,8 +1473,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1494,8 +1473,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_SERVER_PORT, CFG_CONNECTION_SERVER_PORT,
...@@ -1506,8 +1484,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1506,8 +1484,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_NODE_2, CFG_CONNECTION_NODE_2,
...@@ -1518,8 +1496,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1518,8 +1496,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
MANDATORY, MANDATORY,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_SEND_SIGNAL_ID, CFG_CONNECTION_SEND_SIGNAL_ID,
...@@ -1529,9 +1506,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1529,9 +1506,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
false, "false",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
...@@ -1542,9 +1519,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1542,9 +1519,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
true, "true",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_SHM_KEY, CFG_SHM_KEY,
...@@ -1555,8 +1532,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1555,8 +1532,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_SHM_BUFFER_MEM, CFG_SHM_BUFFER_MEM,
...@@ -1566,9 +1543,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1566,9 +1543,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1048576, "1M",
4096, "4K",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_NODE_1_SYSTEM, CFG_CONNECTION_NODE_1_SYSTEM,
...@@ -1579,8 +1556,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1579,8 +1556,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_NODE_2_SYSTEM, CFG_CONNECTION_NODE_2_SYSTEM,
...@@ -1591,8 +1567,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1591,8 +1567,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
/**************************************************************************** /****************************************************************************
* SCI * SCI
...@@ -1605,7 +1580,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1605,7 +1580,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
CONNECTION_TYPE_SCI, (const char *)CONNECTION_TYPE_SCI,
0, 0 0, 0
}, },
...@@ -1618,8 +1593,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1618,8 +1593,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_NODE_2, CFG_CONNECTION_NODE_2,
...@@ -1630,8 +1605,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1630,8 +1605,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_SCI_ID_0, CFG_SCI_ID_0,
...@@ -1642,8 +1617,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1642,8 +1617,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_SCI_ID_1, CFG_SCI_ID_1,
...@@ -1654,8 +1629,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1654,8 +1629,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_SEND_SIGNAL_ID, CFG_CONNECTION_SEND_SIGNAL_ID,
...@@ -1665,9 +1640,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1665,9 +1640,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
true, "true",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_CONNECTION_CHECKSUM, CFG_CONNECTION_CHECKSUM,
...@@ -1677,9 +1652,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1677,9 +1652,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
false, "false",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_SCI_SEND_LIMIT, CFG_SCI_SEND_LIMIT,
...@@ -1689,9 +1664,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1689,9 +1664,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
2048, "2K",
512, "512",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_SCI_BUFFER_MEM, CFG_SCI_BUFFER_MEM,
...@@ -1701,9 +1676,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1701,9 +1676,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1048576, "1M",
262144, "256K",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_NODE_1_SYSTEM, CFG_CONNECTION_NODE_1_SYSTEM,
...@@ -1714,8 +1689,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1714,8 +1689,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_NODE_2_SYSTEM, CFG_CONNECTION_NODE_2_SYSTEM,
...@@ -1726,8 +1700,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1726,8 +1700,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
/**************************************************************************** /****************************************************************************
* OSE * OSE
...@@ -1740,7 +1713,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1740,7 +1713,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::SECTION, ConfigInfo::SECTION,
CONNECTION_TYPE_OSE, (const char *)CONNECTION_TYPE_OSE,
0, 0 0, 0
}, },
...@@ -1753,8 +1726,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1753,8 +1726,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_OSE_HOSTNAME_2, CFG_OSE_HOSTNAME_2,
...@@ -1765,8 +1737,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1765,8 +1737,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
{ {
CFG_CONNECTION_NODE_1, CFG_CONNECTION_NODE_1,
...@@ -1777,8 +1748,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1777,8 +1748,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_NODE_2, CFG_CONNECTION_NODE_2,
...@@ -1789,8 +1760,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1789,8 +1760,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
UNDEFINED, UNDEFINED,
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_SEND_SIGNAL_ID, CFG_CONNECTION_SEND_SIGNAL_ID,
...@@ -1800,9 +1771,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1800,9 +1771,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
true, "true",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_CONNECTION_CHECKSUM, CFG_CONNECTION_CHECKSUM,
...@@ -1812,9 +1783,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1812,9 +1783,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::BOOL, ConfigInfo::BOOL,
false, "false",
0, "false",
MAX_INT_RNIL }, "true" },
{ {
CFG_OSE_PRIO_A_SIZE, CFG_OSE_PRIO_A_SIZE,
...@@ -1824,9 +1795,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1824,9 +1795,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1000, "1000",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_OSE_PRIO_B_SIZE, CFG_OSE_PRIO_B_SIZE,
...@@ -1836,9 +1807,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1836,9 +1807,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1000, "1000",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_OSE_RECEIVE_ARRAY_SIZE, CFG_OSE_RECEIVE_ARRAY_SIZE,
...@@ -1848,9 +1819,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1848,9 +1819,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
10, "10",
0, "0",
MAX_INT_RNIL }, MAX_INT_RNIL_STRING },
{ {
CFG_CONNECTION_NODE_1_SYSTEM, CFG_CONNECTION_NODE_1_SYSTEM,
...@@ -1861,8 +1832,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1861,8 +1832,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL},
{ {
CFG_CONNECTION_NODE_2_SYSTEM, CFG_CONNECTION_NODE_2_SYSTEM,
...@@ -1873,8 +1843,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1873,8 +1843,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::STRING, ConfigInfo::STRING,
UNDEFINED, UNDEFINED,
0, 0, 0 },
MAX_INT_RNIL },
}; };
const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo); const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo);
...@@ -1893,8 +1862,20 @@ ConfigInfo::ConfigInfo() { ...@@ -1893,8 +1862,20 @@ ConfigInfo::ConfigInfo() {
m_info.setCaseInsensitiveNames(true); m_info.setCaseInsensitiveNames(true);
m_systemDefaults.setCaseInsensitiveNames(true); m_systemDefaults.setCaseInsensitiveNames(true);
{
Uint64 tmp_uint64;
require(InitConfigFileParser::convertStringToUint64(RNIL_STRING, tmp_uint64));
require(tmp_uint64 == RNIL);
require(InitConfigFileParser::convertStringToUint64(MAX_INT_RNIL_STRING, tmp_uint64));
require(tmp_uint64 == ((Uint64)RNIL-1));
require(InitConfigFileParser::convertStringToUint64(MAX_NODES_STRING, tmp_uint64));
require(tmp_uint64 == (MAX_NODES-1));
}
for (i=0; i<m_NoOfParams; i++) { for (i=0; i<m_NoOfParams; i++) {
const ParamInfo & param = m_ParamInfo[i]; const ParamInfo & param = m_ParamInfo[i];
Uint64 default_uint64;
bool default_bool;
// Create new section if it did not exist // Create new section if it did not exist
if (!m_info.getCopy(param._section, &section)) { if (!m_info.getCopy(param._section, &section)) {
...@@ -1914,9 +1895,37 @@ ConfigInfo::ConfigInfo() { ...@@ -1914,9 +1895,37 @@ ConfigInfo::ConfigInfo() {
pinfo.put("Updateable", param._updateable); pinfo.put("Updateable", param._updateable);
pinfo.put("Type", param._type); pinfo.put("Type", param._type);
pinfo.put("Status", param._status); pinfo.put("Status", param._status);
pinfo.put64("Default", param._default);
pinfo.put64("Min", param._min); if(param._default == MANDATORY){
pinfo.put64("Max", param._max); pinfo.put("Mandatory", (Uint32)1);
}
switch (param._type) {
case BOOL:
{
bool tmp_bool;
require(InitConfigFileParser::convertStringToBool(param._min, tmp_bool));
pinfo.put64("Min", tmp_bool);
require(InitConfigFileParser::convertStringToBool(param._max, tmp_bool));
pinfo.put64("Max", tmp_bool);
break;
}
case INT:
case INT64:
{
Uint64 tmp_uint64;
require(InitConfigFileParser::convertStringToUint64(param._min, tmp_uint64));
pinfo.put64("Min", tmp_uint64);
require(InitConfigFileParser::convertStringToUint64(param._max, tmp_uint64));
pinfo.put64("Max", tmp_uint64);
break;
}
case SECTION:
pinfo.put("SectionType", (Uint32)param._default);
break;
case STRING:
break;
}
// Check that pinfo is really new // Check that pinfo is really new
if (section->get(param._fname, &oldpinfo)) { if (section->get(param._fname, &oldpinfo)) {
...@@ -1938,10 +1947,31 @@ ConfigInfo::ConfigInfo() { ...@@ -1938,10 +1947,31 @@ ConfigInfo::ConfigInfo() {
p = new Properties(); p = new Properties();
p->setCaseInsensitiveNames(true); p->setCaseInsensitiveNames(true);
} }
if(param._type != STRING && if(param._default != UNDEFINED &&
param._default != UNDEFINED &&
param._default != MANDATORY){ param._default != MANDATORY){
switch (param._type)
{
case SECTION:
break;
case STRING:
require(p->put(param._fname, param._default)); require(p->put(param._fname, param._default));
break;
case BOOL:
{
bool tmp_bool;
require(InitConfigFileParser::convertStringToBool(param._default, default_bool));
require(p->put(param._fname, default_bool));
break;
}
case INT:
case INT64:
{
Uint64 tmp_uint64;
require(InitConfigFileParser::convertStringToUint64(param._default, default_uint64));
require(p->put(param._fname, default_uint64));
break;
}
}
} }
require(m_systemDefaults.put(param._section, p, true)); require(m_systemDefaults.put(param._section, p, true));
delete p; delete p;
...@@ -2125,7 +2155,7 @@ void ConfigInfo::print(const Properties * section, ...@@ -2125,7 +2155,7 @@ void ConfigInfo::print(const Properties * section,
ndbout << "Default: N (Legal values: Y, N)" << endl; ndbout << "Default: N (Legal values: Y, N)" << endl;
} else if (getDefault(section, parameter) == true) { } else if (getDefault(section, parameter) == true) {
ndbout << "Default: Y (Legal values: Y, N)" << endl; ndbout << "Default: Y (Legal values: Y, N)" << endl;
} else if (getDefault(section, parameter) == MANDATORY) { } else if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
ndbout << "MANDATORY (Legal values: Y, N)" << endl; ndbout << "MANDATORY (Legal values: Y, N)" << endl;
} else { } else {
ndbout << "UNKNOWN" << endl; ndbout << "UNKNOWN" << endl;
...@@ -2137,9 +2167,9 @@ void ConfigInfo::print(const Properties * section, ...@@ -2137,9 +2167,9 @@ void ConfigInfo::print(const Properties * section,
case ConfigInfo::INT64: case ConfigInfo::INT64:
ndbout << " (Non-negative Integer)" << endl; ndbout << " (Non-negative Integer)" << endl;
ndbout << getDescription(section, parameter) << endl; ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == MANDATORY) { if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
ndbout << "MANDATORY ("; ndbout << "MANDATORY (";
} else if (getDefault(section, parameter) == UNDEFINED) { } else if (getDefault(section, parameter) == (UintPtr)UNDEFINED) {
ndbout << "UNDEFINED ("; ndbout << "UNDEFINED (";
} else { } else {
ndbout << "Default: " << getDefault(section, parameter) << " ("; ndbout << "Default: " << getDefault(section, parameter) << " (";
...@@ -2152,7 +2182,7 @@ void ConfigInfo::print(const Properties * section, ...@@ -2152,7 +2182,7 @@ void ConfigInfo::print(const Properties * section,
case ConfigInfo::STRING: case ConfigInfo::STRING:
ndbout << " (String)" << endl; ndbout << " (String)" << endl;
ndbout << getDescription(section, parameter) << endl; ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == MANDATORY) { if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
ndbout << "MANDATORY" << endl; ndbout << "MANDATORY" << endl;
} else { } else {
ndbout << "No default value" << endl; ndbout << "No default value" << endl;
...@@ -2218,17 +2248,17 @@ transformNode(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -2218,17 +2248,17 @@ transformNode(InitConfigFileParser::Context & ctx, const char * data){
bool bool
fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
const char * hostname;
if (ctx.m_currentSection->get("HostName", &hostname))
return true;
const char * compId; const char * compId;
if(!ctx.m_currentSection->get("ExecuteOnComputer", &compId)){ if(!ctx.m_currentSection->get("ExecuteOnComputer", &compId)){
require(ctx.m_currentSection->put("HostName", ""));
const char * type; const char * type;
if(ctx.m_currentSection->get("Type", &type) && strcmp(type,"DB") == 0) { if(ctx.m_currentSection->get("Type", &type) && strcmp(type,"DB") == 0)
ctx.reportError("Parameter \"ExecuteOnComputer\" missing from DB section" require(ctx.m_currentSection->put("HostName", "localhost"));
" [%s] starting at line: %d", else
ctx.fname, ctx.m_sectionLineno); require(ctx.m_currentSection->put("HostName", ""));
return false;
}
return true; return true;
} }
...@@ -2242,7 +2272,6 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -2242,7 +2272,6 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
return false; return false;
} }
const char * hostname;
if(!computer->get("HostName", &hostname)){ if(!computer->get("HostName", &hostname)){
ctx.reportError("HostName missing in [COMPUTER] (Id: %d) " ctx.reportError("HostName missing in [COMPUTER] (Id: %d) "
" - [%s] starting at line: %d", " - [%s] starting at line: %d",
...@@ -2440,7 +2469,7 @@ checkMandatory(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -2440,7 +2469,7 @@ checkMandatory(InitConfigFileParser::Context & ctx, const char * data){
const Properties * info = NULL; const Properties * info = NULL;
::require(ctx.m_currentInfo->get(name, &info)); ::require(ctx.m_currentInfo->get(name, &info));
Uint32 val; Uint32 val;
if(info->get("Default", &val) && val == MANDATORY){ if(info->get("Mandatory", &val)){
const char * fname; const char * fname;
::require(info->get("Fname", &fname)); ::require(info->get("Fname", &fname));
if(!ctx.m_currentSection->contains(fname)){ if(!ctx.m_currentSection->contains(fname)){
...@@ -2634,7 +2663,7 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -2634,7 +2663,7 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
if (!ctx.m_userProperties.get("ServerPortBase", &base)){ if (!ctx.m_userProperties.get("ServerPortBase", &base)){
if(!(ctx.m_userDefaults && ctx.m_userDefaults->get("PortNumber", &base)) && if(!(ctx.m_userDefaults && ctx.m_userDefaults->get("PortNumber", &base)) &&
!ctx.m_systemDefaults->get("PortNumber", &base)) { !ctx.m_systemDefaults->get("PortNumber", &base)) {
base= NDB_BASE_PORT+2; base= strtoll(NDB_BASE_PORT,0,0)+2;
// ctx.reportError("Cannot retrieve base port number"); // ctx.reportError("Cannot retrieve base port number");
// return false; // return false;
} }
...@@ -2886,7 +2915,7 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -2886,7 +2915,7 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){
require(sec->get("Fname", &secName)); require(sec->get("Fname", &secName));
require(sec->get("Id", &id)); require(sec->get("Id", &id));
require(sec->get("Status", &status)); require(sec->get("Status", &status));
require(sec->get("Default", &typeVal)); require(sec->get("SectionType", &typeVal));
if(id == KEY_INTERNAL || status == ConfigInfo::INTERNAL){ if(id == KEY_INTERNAL || status == ConfigInfo::INTERNAL){
ndbout_c("skipping section %s", ctx.fname); ndbout_c("skipping section %s", ctx.fname);
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
* A MANDATORY parameters must be specified in the config file * A MANDATORY parameters must be specified in the config file
* An UNDEFINED parameter may or may not be specified in the config file * An UNDEFINED parameter may or may not be specified in the config file
*/ */
static const Uint64 MANDATORY = ~0; // Default value for mandatory params. static const char* MANDATORY = (char*)~(UintPtr)0; // Default value for mandatory params.
static const Uint64 UNDEFINED = (~0)-1; // Default value for undefined params. static const char* UNDEFINED = 0; // Default value for undefined params.
/** /**
* @class ConfigInfo * @class ConfigInfo
...@@ -56,9 +56,9 @@ public: ...@@ -56,9 +56,9 @@ public:
Status _status; Status _status;
bool _updateable; bool _updateable;
Type _type; Type _type;
Uint64 _default; const char* _default;
Uint64 _min; const char* _min;
Uint64 _max; const char* _max;
}; };
/** /**
......
...@@ -31,7 +31,6 @@ static void require(bool v) { if(!v) abort();} ...@@ -31,7 +31,6 @@ static void require(bool v) { if(!v) abort();}
// Ctor / Dtor // Ctor / Dtor
//**************************************************************************** //****************************************************************************
InitConfigFileParser::InitConfigFileParser(){ InitConfigFileParser::InitConfigFileParser(){
m_info = new ConfigInfo(); m_info = new ConfigInfo();
} }
...@@ -111,7 +110,6 @@ InitConfigFileParser::parseConfig(FILE * file) { ...@@ -111,7 +110,6 @@ InitConfigFileParser::parseConfig(FILE * file) {
"of configuration file."); "of configuration file.");
return 0; return 0;
} }
snprintf(ctx.fname, sizeof(ctx.fname), section); free(section); snprintf(ctx.fname, sizeof(ctx.fname), section); free(section);
ctx.type = InitConfigFileParser::DefaultSection; ctx.type = InitConfigFileParser::DefaultSection;
ctx.m_sectionLineno = ctx.m_lineno; ctx.m_sectionLineno = ctx.m_lineno;
...@@ -132,7 +130,6 @@ InitConfigFileParser::parseConfig(FILE * file) { ...@@ -132,7 +130,6 @@ InitConfigFileParser::parseConfig(FILE * file) {
"of configuration file."); "of configuration file.");
return 0; return 0;
} }
snprintf(ctx.fname, sizeof(ctx.fname), section); snprintf(ctx.fname, sizeof(ctx.fname), section);
free(section); free(section);
ctx.type = InitConfigFileParser::Section; ctx.type = InitConfigFileParser::Section;
...@@ -162,7 +159,6 @@ InitConfigFileParser::parseConfig(FILE * file) { ...@@ -162,7 +159,6 @@ InitConfigFileParser::parseConfig(FILE * file) {
ctx.reportError("Could not store section of configuration file."); ctx.reportError("Could not store section of configuration file.");
return 0; return 0;
} }
for(size_t i = 0; ConfigInfo::m_ConfigRules[i].m_configRule != 0; i++){ for(size_t i = 0; ConfigInfo::m_ConfigRules[i].m_configRule != 0; i++){
ctx.type = InitConfigFileParser::Undefined; ctx.type = InitConfigFileParser::Undefined;
ctx.m_currentSection = 0; ctx.m_currentSection = 0;
...@@ -378,7 +374,7 @@ bool InitConfigFileParser::convertStringToUint64(const char* s, ...@@ -378,7 +374,7 @@ bool InitConfigFileParser::convertStringToUint64(const char* s,
errno = 0; errno = 0;
char* p; char* p;
long long v = strtoll(s, &p, 10); long long v = strtoll(s, &p, log10base);
if (errno != 0) if (errno != 0)
return false; return false;
...@@ -536,20 +532,18 @@ InitConfigFileParser::storeSection(Context& ctx){ ...@@ -536,20 +532,18 @@ InitConfigFileParser::storeSection(Context& ctx){
if(ctx.type == InitConfigFileParser::Section){ if(ctx.type == InitConfigFileParser::Section){
for(int i = 0; i<m_info->m_NoOfRules; i++){ for(int i = 0; i<m_info->m_NoOfRules; i++){
const ConfigInfo::SectionRule & rule = m_info->m_SectionRules[i]; const ConfigInfo::SectionRule & rule = m_info->m_SectionRules[i];
if(!strcmp(rule.m_section, "*") || !strcmp(rule.m_section, ctx.fname)) if(!strcmp(rule.m_section, "*") || !strcmp(rule.m_section, ctx.fname)){
if(!(* rule.m_sectionRule)(ctx, rule.m_ruleData)) if(!(* rule.m_sectionRule)(ctx, rule.m_ruleData)){
return false; return false;
} }
} }
}
}
if(ctx.type == InitConfigFileParser::DefaultSection) if(ctx.type == InitConfigFileParser::DefaultSection)
require(ctx.m_defaults->put(ctx.pname, ctx.m_currentSection)); require(ctx.m_defaults->put(ctx.pname, ctx.m_currentSection));
if(ctx.type == InitConfigFileParser::Section) if(ctx.type == InitConfigFileParser::Section)
require(ctx.m_config->put(ctx.pname, ctx.m_currentSection)); require(ctx.m_config->put(ctx.pname, ctx.m_currentSection));
delete ctx.m_currentSection; ctx.m_currentSection = NULL; delete ctx.m_currentSection; ctx.m_currentSection = NULL;
return true; return true;
} }
......
...@@ -86,6 +86,9 @@ public: ...@@ -86,6 +86,9 @@ public:
void reportWarning(const char * msg, ...); void reportWarning(const char * msg, ...);
}; };
static bool convertStringToUint64(const char* s, Uint64& val, Uint32 log10base = 0);
static bool convertStringToBool(const char* s, bool& val);
private: private:
/** /**
* Check if line only contains space/comments * Check if line only contains space/comments
...@@ -111,8 +114,6 @@ private: ...@@ -111,8 +114,6 @@ private:
bool parseNameValuePair(Context&, const char* line); bool parseNameValuePair(Context&, const char* line);
bool storeNameValuePair(Context&, const char* fname, const char* value); bool storeNameValuePair(Context&, const char* fname, const char* value);
bool convertStringToUint64(const char* s, Uint64& val, Uint32 log10base = 0);
bool convertStringToBool(const char* s, bool& val);
bool storeSection(Context&); bool storeSection(Context&);
const Properties* getSection(const char * name, const Properties* src); const Properties* getSection(const char * name, const Properties* src);
......
...@@ -89,7 +89,7 @@ LocalConfig::init(const char *connectString, ...@@ -89,7 +89,7 @@ LocalConfig::init(const char *connectString,
//7. Check //7. Check
{ {
char buf[256]; char buf[256];
snprintf(buf, sizeof(buf), "host=localhost:%u", NDB_BASE_PORT); snprintf(buf, sizeof(buf), "host=localhost:%s", NDB_BASE_PORT);
if(readConnectString(buf)) if(readConnectString(buf))
return true; return true;
} }
......
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
noinst_LTLIBRARIES = libmgmsrvcommon.la noinst_LTLIBRARIES = libmgmsrvcommon.la
libmgmsrvcommon_la_SOURCES = \ libmgmsrvcommon_la_SOURCES = \
...@@ -10,6 +14,11 @@ libmgmsrvcommon_la_SOURCES = \ ...@@ -10,6 +14,11 @@ libmgmsrvcommon_la_SOURCES = \
INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmapi INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmapi
DEFS_LOC = -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DNDB_BASE_PORT="\"@ndb_port_base@\""
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include "Services.hpp" #include "Services.hpp"
extern bool g_StopServer;
static const unsigned int MAX_READ_TIMEOUT = 1000 ; static const unsigned int MAX_READ_TIMEOUT = 1000 ;
static const unsigned int MAX_WRITE_TIMEOUT = 100 ; static const unsigned int MAX_WRITE_TIMEOUT = 100 ;
...@@ -1012,11 +1014,28 @@ MgmApiSession::stop(Parser<MgmApiSession>::Context &, ...@@ -1012,11 +1014,28 @@ MgmApiSession::stop(Parser<MgmApiSession>::Context &,
nodes.push_back(atoi(p)); nodes.push_back(atoi(p));
} }
int stop_self= 0;
for(size_t i=0; i < nodes.size(); i++) {
if (nodes[i] == m_mgmsrv.getOwnNodeId()) {
stop_self= 1;
if (i != nodes.size()-1) {
m_output->println("stop reply");
m_output->println("result: server must be stopped last");
m_output->println("");
return;
}
}
}
int stopped = 0, result = 0; int stopped = 0, result = 0;
for(size_t i=0; i < nodes.size(); i++) for(size_t i=0; i < nodes.size(); i++)
if (nodes[i] != m_mgmsrv.getOwnNodeId()) {
if((result = m_mgmsrv.stopNode(nodes[i], abort != 0)) == 0) if((result = m_mgmsrv.stopNode(nodes[i], abort != 0)) == 0)
stopped++; stopped++;
} else
stopped++;
m_output->println("stop reply"); m_output->println("stop reply");
if(result != 0) if(result != 0)
...@@ -1025,6 +1044,9 @@ MgmApiSession::stop(Parser<MgmApiSession>::Context &, ...@@ -1025,6 +1044,9 @@ MgmApiSession::stop(Parser<MgmApiSession>::Context &,
m_output->println("result: Ok"); m_output->println("result: Ok");
m_output->println("stopped: %d", stopped); m_output->println("stopped: %d", stopped);
m_output->println(""); m_output->println("");
if (stop_self)
g_StopServer= true;
} }
......
...@@ -265,9 +265,10 @@ NDB_MAIN(mgmsrv){ ...@@ -265,9 +265,10 @@ NDB_MAIN(mgmsrv){
NdbSleep_MilliSleep(500); NdbSleep_MilliSleep(500);
} }
g_EventLogger.info("Shutting down server...");
glob.socketServer->stopServer(); glob.socketServer->stopServer();
glob.socketServer->stopSessions(); glob.socketServer->stopSessions();
g_EventLogger.info("Shutdown complete");
return 0; return 0;
error_end: error_end:
return 1; return 1;
......
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