Commit 207d4484 authored by unknown's avatar unknown

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

into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents f94cc6e6 7fa8e047
...@@ -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
......
...@@ -1451,12 +1451,10 @@ then ...@@ -1451,12 +1451,10 @@ then
then then
echo "Starting ndbcluster" echo "Starting ndbcluster"
./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --small --diskless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1 ./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --small --diskless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
NDB_CONNECTSTRING="host=localhost:$NDBCLUSTER_PORT" USE_NDBCLUSTER="$USE_NDBCLUSTER --ndb-connectstring=\"host=localhost:$NDBCLUSTER_PORT\""
export NDB_CONNECTSTRING
else else
NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER" USE_NDBCLUSTER="$USE_NDBCLUSTER --ndb-connectstring=\"$USE_RUNNING_NDBCLUSTER\""
export NDB_CONNECTSTRING echo "Using ndbcluster at $USE_NDBCLUSTER"
echo "Using ndbcluster at $NDB_CONNECTSTRING"
fi fi
fi fi
......
...@@ -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
......
...@@ -116,3 +116,21 @@ select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; ...@@ -116,3 +116,21 @@ select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;
collation(a) collation(b) collation(binary 'ccc') collation(a) collation(b) collation(binary 'ccc')
latin1_bin binary latin1_bin latin1_bin binary latin1_bin
drop table t1; drop table t1;
create table t1( firstname char(20), lastname char(20));
insert into t1 values ("john","doe"),("John","Doe");
select * from t1 where firstname='john' and firstname like binary 'john';
firstname lastname
john doe
select * from t1 where firstname='john' and binary 'john' = firstname;
firstname lastname
john doe
select * from t1 where firstname='john' and firstname = binary 'john';
firstname lastname
john doe
select * from t1 where firstname='John' and firstname like binary 'john';
firstname lastname
john doe
select * from t1 where firstname='john' and firstname like binary 'John';
firstname lastname
John Doe
drop table t1;
...@@ -560,3 +560,13 @@ select * from t1 where str='str'; ...@@ -560,3 +560,13 @@ select * from t1 where str='str';
str str
str str
drop table t1; drop table t1;
create table t1 (
str varchar(255) character set utf8 not null,
key str using hash (str(2))
) engine=heap;
INSERT INTO t1 VALUES ('str');
INSERT INTO t1 VALUES ('str2');
select * from t1 where str='str';
str
str
drop table t1;
...@@ -634,7 +634,7 @@ insert into t2 values (10,1),(20,2),(30,3); ...@@ -634,7 +634,7 @@ insert into t2 values (10,1),(20,2),(30,3);
explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using index 1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using index
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 2 const 1 Using where; Using index 1 SIMPLE t1 const PRIMARY PRIMARY 2 const 1 Using where; Using index
select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
fooID barID fooID fooID barID fooID
10 1 NULL 10 1 NULL
...@@ -682,3 +682,72 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -682,3 +682,72 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 1 SIMPLE t2 ALL NULL NULL NULL NULL 2
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 1 SIMPLE t3 ALL NULL NULL NULL NULL 2
drop table t1, t2, t3; drop table t1, t2, t3;
create table t1 (
match_id tinyint(3) unsigned not null auto_increment,
home tinyint(3) unsigned default '0',
unique key match_id (match_id),
key match_id_2 (match_id)
);
insert into t1 values("1", "2");
create table t2 (
player_id tinyint(3) unsigned default '0',
match_1_h tinyint(3) unsigned default '0',
key player_id (player_id)
);
insert into t2 values("1", "5");
insert into t2 values("2", "9");
insert into t2 values("3", "3");
insert into t2 values("4", "7");
insert into t2 values("5", "6");
insert into t2 values("6", "8");
insert into t2 values("7", "4");
insert into t2 values("8", "12");
insert into t2 values("9", "11");
insert into t2 values("10", "10");
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by m.match_id desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10
1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
player_id match_1_h * match_id home UUX
8 12 * 1 2 10
9 11 * 1 2 9
10 10 * 1 2 8
2 9 * 1 2 7
6 8 * 1 2 6
4 7 * 1 2 5
5 6 * 1 2 4
1 5 * 1 2 3
7 4 * 1 2 2
3 3 * 1 2 1
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
t2 s straight_join t1 m where m.match_id = 1
order by UUX desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
t2 s straight_join t1 m where m.match_id = 1
order by UUX desc;
player_id match_1_h * match_id home UUX
8 12 * 1 2 10
9 11 * 1 2 9
10 10 * 1 2 8
2 9 * 1 2 7
6 8 * 1 2 6
4 7 * 1 2 5
5 6 * 1 2 4
1 5 * 1 2 3
7 4 * 1 2 2
3 3 * 1 2 1
drop table t1, t2;
...@@ -401,10 +401,3 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; ...@@ -401,10 +401,3 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
delete from mysql.db delete from mysql.db
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges; flush privileges;
set names latin1;
create database ``;
create table ``.`` (a int) engine=heap;
show table status from `` LIKE '';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
HEAP 9 Fixed 0 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
drop database ``;
...@@ -67,3 +67,16 @@ select * from t1 where lower(b)='bbb'; ...@@ -67,3 +67,16 @@ select * from t1 where lower(b)='bbb';
select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1;
select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;
drop table t1; drop table t1;
#
# Bug5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results
#
create table t1( firstname char(20), lastname char(20));
insert into t1 values ("john","doe"),("John","Doe");
select * from t1 where firstname='john' and firstname like binary 'john';
select * from t1 where firstname='john' and binary 'john' = firstname;
select * from t1 where firstname='john' and firstname = binary 'john';
select * from t1 where firstname='John' and firstname like binary 'john';
select * from t1 where firstname='john' and firstname like binary 'John';
drop table t1;
...@@ -417,3 +417,15 @@ INSERT INTO t1 VALUES ('str'); ...@@ -417,3 +417,15 @@ INSERT INTO t1 VALUES ('str');
INSERT INTO t1 VALUES ('str2'); INSERT INTO t1 VALUES ('str2');
select * from t1 where str='str'; select * from t1 where str='str';
drop table t1; drop table t1;
# the same for HEAP+HASH
#
create table t1 (
str varchar(255) character set utf8 not null,
key str using hash (str(2))
) engine=heap;
INSERT INTO t1 VALUES ('str');
INSERT INTO t1 VALUES ('str2');
select * from t1 where str='str';
drop table t1;
...@@ -451,3 +451,53 @@ select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is ...@@ -451,3 +451,53 @@ select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is
explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null;
drop table t1, t2, t3; drop table t1, t2, t3;
# Test for BUG#5088
create table t1 (
match_id tinyint(3) unsigned not null auto_increment,
home tinyint(3) unsigned default '0',
unique key match_id (match_id),
key match_id_2 (match_id)
);
insert into t1 values("1", "2");
create table t2 (
player_id tinyint(3) unsigned default '0',
match_1_h tinyint(3) unsigned default '0',
key player_id (player_id)
);
insert into t2 values("1", "5");
insert into t2 values("2", "9");
insert into t2 values("3", "3");
insert into t2 values("4", "7");
insert into t2 values("5", "6");
insert into t2 values("6", "8");
insert into t2 values("7", "4");
insert into t2 values("8", "12");
insert into t2 values("9", "11");
insert into t2 values("10", "10");
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by m.match_id desc;
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
t2 s straight_join t1 m where m.match_id = 1
order by UUX desc;
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
t2 s straight_join t1 m where m.match_id = 1
order by UUX desc;
drop table t1, t2;
...@@ -307,9 +307,11 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; ...@@ -307,9 +307,11 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges; flush privileges;
#Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection #Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection
set names latin1; # This test fails on MAC OSX, so it is temporary disabled.
create database ``; # This needs WL#1324 to be done.
create table ``.`` (a int) engine=heap; #set names latin1;
--replace_column 7 # 8 # 9 # #create database ``;
show table status from `` LIKE ''; #create table ``.`` (a int) engine=heap;
drop database ``; #--replace_column 7 # 8 # 9 #
#show table status from `` LIKE '';
#drop database ``;
LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \ LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \
$(top_builddir)/ndb/src/libndbclient.la $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \ -I$(top_srcdir)/ndb/include \
......
LDADD += $(top_builddir)/ndb/src/libndbclient.la LDADD += \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \ -I$(top_srcdir)/ndb/include \
......
...@@ -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
......
...@@ -3,7 +3,11 @@ ndbbin_PROGRAMS = ndb_cpcd ...@@ -3,7 +3,11 @@ ndbbin_PROGRAMS = ndb_cpcd
ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp
LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am include $(top_srcdir)/ndb/config/type_util.mk.am
......
...@@ -3,7 +3,11 @@ ndbtools_PROGRAMS = ndb_restore ...@@ -3,7 +3,11 @@ ndbtools_PROGRAMS = ndb_restore
ndb_restore_SOURCES = main.cpp consumer.cpp consumer_restore.cpp consumer_printer.cpp Restore.cpp ndb_restore_SOURCES = main.cpp consumer.cpp consumer_restore.cpp consumer_printer.cpp Restore.cpp
LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
......
...@@ -405,3 +405,7 @@ operator<<(NdbOut& out, const Dbtup::Th& th) ...@@ -405,3 +405,7 @@ operator<<(NdbOut& out, const Dbtup::Th& th)
return out; return out;
} }
#endif #endif
#ifdef VM_TRACE
template class Vector<Chunk>;
#endif
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
ParserRow_t::IgnoreMinMax, \ ParserRow_t::IgnoreMinMax, \
0, 0, \ 0, 0, \
0, \ 0, \
(desc) } (desc), 0 }
#define CPC_END() \ #define CPC_END() \
{ 0, \ { 0, \
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
ParserRow_t::IgnoreMinMax, \ ParserRow_t::IgnoreMinMax, \
0, 0, \ 0, 0, \
0, \ 0, \
0 } 0, 0 }
#ifdef DEBUG_PRINT_PROPERTIES #ifdef DEBUG_PRINT_PROPERTIES
static void printprop(const Properties &p) { static void printprop(const Properties &p) {
......
...@@ -19,6 +19,10 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \ ...@@ -19,6 +19,10 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \
LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \ LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/ndb/src/common/editline/libeditline.a \ $(top_builddir)/ndb/src/common/editline/libeditline.a \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
@TERMCAP_LIB@ @TERMCAP_LIB@
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.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;
......
...@@ -296,6 +296,7 @@ Remark: Start transaction. Synchronous. ...@@ -296,6 +296,7 @@ Remark: Start transaction. Synchronous.
NdbConnection* NdbConnection*
Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
{ {
DBUG_ENTER("Ndb::startTransaction");
if (theInitState == Initialised) { if (theInitState == Initialised) {
theError.code = 0; theError.code = 0;
...@@ -312,9 +313,9 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) ...@@ -312,9 +313,9 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
} else { } else {
nodeId = 0; nodeId = 0;
}//if }//if
return startTransactionLocal(aPriority, nodeId); DBUG_RETURN(startTransactionLocal(aPriority, nodeId));
} else { } else {
return NULL; DBUG_RETURN(NULL);
}//if }//if
}//Ndb::startTransaction() }//Ndb::startTransaction()
...@@ -329,9 +330,11 @@ Remark: Start transaction. Synchronous. ...@@ -329,9 +330,11 @@ Remark: Start transaction. Synchronous.
NdbConnection* NdbConnection*
Ndb::hupp(NdbConnection* pBuddyTrans) Ndb::hupp(NdbConnection* pBuddyTrans)
{ {
DBUG_ENTER("Ndb::hupp");
Uint32 aPriority = 0; Uint32 aPriority = 0;
if (pBuddyTrans == NULL){ if (pBuddyTrans == NULL){
return startTransaction(); DBUG_RETURN(startTransaction());
} }
if (theInitState == Initialised) { if (theInitState == Initialised) {
...@@ -341,19 +344,19 @@ Ndb::hupp(NdbConnection* pBuddyTrans) ...@@ -341,19 +344,19 @@ Ndb::hupp(NdbConnection* pBuddyTrans)
Uint32 nodeId = pBuddyTrans->getConnectedNodeId(); Uint32 nodeId = pBuddyTrans->getConnectedNodeId();
NdbConnection* pCon = startTransactionLocal(aPriority, nodeId); NdbConnection* pCon = startTransactionLocal(aPriority, nodeId);
if(pCon == NULL) if(pCon == NULL)
return NULL; DBUG_RETURN(NULL);
if (pCon->getConnectedNodeId() != nodeId){ if (pCon->getConnectedNodeId() != nodeId){
// We could not get a connection to the desired node // We could not get a connection to the desired node
// release the connection and return NULL // release the connection and return NULL
closeTransaction(pCon); closeTransaction(pCon);
return NULL; DBUG_RETURN(NULL);
} }
pCon->setTransactionId(pBuddyTrans->getTransactionId()); pCon->setTransactionId(pBuddyTrans->getTransactionId());
pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr()); pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr());
return pCon; DBUG_RETURN(pCon);
} else { } else {
return NULL; DBUG_RETURN(NULL);
}//if }//if
}//Ndb::hupp() }//Ndb::hupp()
...@@ -443,6 +446,8 @@ Remark: Close transaction by releasing the connection and all operations ...@@ -443,6 +446,8 @@ Remark: Close transaction by releasing the connection and all operations
void void
Ndb::closeTransaction(NdbConnection* aConnection) Ndb::closeTransaction(NdbConnection* aConnection)
{ {
DBUG_ENTER("Ndb::closeTransaction");
NdbConnection* tCon; NdbConnection* tCon;
NdbConnection* tPreviousCon; NdbConnection* tPreviousCon;
...@@ -454,7 +459,7 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -454,7 +459,7 @@ Ndb::closeTransaction(NdbConnection* aConnection)
#ifdef VM_TRACE #ifdef VM_TRACE
printf("NULL into closeTransaction\n"); printf("NULL into closeTransaction\n");
#endif #endif
return; DBUG_VOID_RETURN;
}//if }//if
CHECK_STATUS_MACRO_VOID; CHECK_STATUS_MACRO_VOID;
...@@ -479,14 +484,14 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -479,14 +484,14 @@ Ndb::closeTransaction(NdbConnection* aConnection)
printf("Scan timeout:ed NdbConnection-> " printf("Scan timeout:ed NdbConnection-> "
"not returning it-> memory leak\n"); "not returning it-> memory leak\n");
#endif #endif
return; DBUG_VOID_RETURN;
} }
#ifdef VM_TRACE #ifdef VM_TRACE
printf("Non-existing transaction into closeTransaction\n"); printf("Non-existing transaction into closeTransaction\n");
abort(); abort();
#endif #endif
return; DBUG_VOID_RETURN;
}//if }//if
tPreviousCon = tCon; tPreviousCon = tCon;
tCon = tCon->next(); tCon = tCon->next();
...@@ -505,7 +510,7 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -505,7 +510,7 @@ Ndb::closeTransaction(NdbConnection* aConnection)
#ifdef VM_TRACE #ifdef VM_TRACE
printf("Con timeout:ed NdbConnection-> not returning it-> memory leak\n"); printf("Con timeout:ed NdbConnection-> not returning it-> memory leak\n");
#endif #endif
return; DBUG_VOID_RETURN;
} }
if (aConnection->theReleaseOnClose == false) { if (aConnection->theReleaseOnClose == false) {
...@@ -515,11 +520,12 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -515,11 +520,12 @@ Ndb::closeTransaction(NdbConnection* aConnection)
Uint32 nodeId = aConnection->getConnectedNodeId(); Uint32 nodeId = aConnection->getConnectedNodeId();
aConnection->theNext = theConnectionArray[nodeId]; aConnection->theNext = theConnectionArray[nodeId];
theConnectionArray[nodeId] = aConnection; theConnectionArray[nodeId] = aConnection;
return; DBUG_VOID_RETURN;
} else { } else {
aConnection->theReleaseOnClose = false; aConnection->theReleaseOnClose = false;
releaseNdbCon(aConnection); releaseNdbCon(aConnection);
}//if }//if
DBUG_VOID_RETURN;
}//Ndb::closeTransaction() }//Ndb::closeTransaction()
/***************************************************************************** /*****************************************************************************
......
...@@ -12,7 +12,11 @@ test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \ ...@@ -12,7 +12,11 @@ test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
atrt_SOURCES = main.cpp atrt_SOURCES = main.cpp
INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmclient INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmclient
LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CpcClient.o $(top_builddir)/ndb/src/libndbclient.la LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CpcClient.o \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
...@@ -46,6 +46,9 @@ static const int max_transactions= 256; ...@@ -46,6 +46,9 @@ static const int max_transactions= 256;
// Default value for prefetch of autoincrement values // Default value for prefetch of autoincrement values
static const ha_rows autoincrement_prefetch= 32; static const ha_rows autoincrement_prefetch= 32;
// connectstring to cluster if given by mysqld
const char *ndbcluster_connectstring= 0;
#define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8 #define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
...@@ -3375,6 +3378,12 @@ int ndb_discover_tables() ...@@ -3375,6 +3378,12 @@ int ndb_discover_tables()
bool ndbcluster_init() bool ndbcluster_init()
{ {
DBUG_ENTER("ndbcluster_init"); DBUG_ENTER("ndbcluster_init");
// Set connectstring if specified
if (ndbcluster_connectstring != 0)
{
DBUG_PRINT("connectstring", ("%s", ndbcluster_connectstring));
Ndb::setConnectString(ndbcluster_connectstring);
}
// Create a Ndb object to open the connection to NDB // Create a Ndb object to open the connection to NDB
g_ndb= new Ndb("sys"); g_ndb= new Ndb("sys");
if (g_ndb->init() != 0) if (g_ndb->init() != 0)
......
...@@ -37,6 +37,8 @@ class NdbScanOperation; ...@@ -37,6 +37,8 @@ class NdbScanOperation;
class NdbIndexScanOperation; class NdbIndexScanOperation;
class NdbBlob; class NdbBlob;
// connectstring to cluster if given by mysqld
extern const char *ndbcluster_connectstring;
typedef enum ndb_index_type { typedef enum ndb_index_type {
UNDEFINED_INDEX = 0, UNDEFINED_INDEX = 0,
......
...@@ -159,10 +159,7 @@ Item *Item_sum::get_tmp_table_item(THD *thd) ...@@ -159,10 +159,7 @@ Item *Item_sum::get_tmp_table_item(THD *thd)
if (!arg->const_item()) if (!arg->const_item())
{ {
if (arg->type() == Item::FIELD_ITEM) if (arg->type() == Item::FIELD_ITEM)
{
arg->maybe_null= result_field_tmp->maybe_null();
((Item_field*) arg)->field= result_field_tmp++; ((Item_field*) arg)->field= result_field_tmp++;
}
else else
sum_item->args[i]= new Item_field(result_field_tmp++); sum_item->args[i]= new Item_field(result_field_tmp++);
} }
......
...@@ -211,10 +211,17 @@ bool key_cmp_if_same(TABLE *table,const byte *key,uint idx,uint key_length) ...@@ -211,10 +211,17 @@ bool key_cmp_if_same(TABLE *table,const byte *key,uint idx,uint key_length)
if (!(key_part->key_type & (FIELDFLAG_NUMBER+FIELDFLAG_BINARY+ if (!(key_part->key_type & (FIELDFLAG_NUMBER+FIELDFLAG_BINARY+
FIELDFLAG_PACK))) FIELDFLAG_PACK)))
{ {
if (my_strnncoll(key_part->field->charset(), CHARSET_INFO *cs= key_part->field->charset();
uint char_length= key_part->length / cs->mbmaxlen;
const byte *pos= table->record[0] + key_part->offset;
if (length > char_length)
{
char_length= my_charpos(cs, pos, pos + length, char_length);
set_if_smaller(char_length, length);
}
if (cs->coll->strnncollsp(cs,
(const uchar*) key, length, (const uchar*) key, length,
(const uchar*) table->record[0]+key_part->offset, (const uchar*) pos, char_length))
length))
return 1; return 1;
} }
else if (memcmp(key,table->record[0]+key_part->offset,length)) else if (memcmp(key,table->record[0]+key_part->offset,length))
......
...@@ -3893,7 +3893,7 @@ enum options_mysqld ...@@ -3893,7 +3893,7 @@ enum options_mysqld
OPT_INNODB_FILE_PER_TABLE, OPT_CRASH_BINLOG_INNODB, OPT_INNODB_FILE_PER_TABLE, OPT_CRASH_BINLOG_INNODB,
OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG, OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG,
OPT_SAFE_SHOW_DB, OPT_INNODB_SAFE_BINLOG, OPT_SAFE_SHOW_DB, OPT_INNODB_SAFE_BINLOG,
OPT_INNODB, OPT_ISAM, OPT_NDBCLUSTER, OPT_SKIP_SAFEMALLOC, OPT_INNODB, OPT_ISAM, OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, OPT_SKIP_SAFEMALLOC,
OPT_TEMP_POOL, OPT_TX_ISOLATION, OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS, OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS,
OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL, OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL,
...@@ -4318,6 +4318,11 @@ master-ssl", ...@@ -4318,6 +4318,11 @@ master-ssl",
Disable with --skip-ndbcluster (will save memory).", Disable with --skip-ndbcluster (will save memory).",
(gptr*) &opt_ndbcluster, (gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 1, 0, 0, (gptr*) &opt_ndbcluster, (gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 1, 0, 0,
0, 0, 0}, 0, 0, 0},
#ifdef HAVE_NDBCLUSTER_DB
{"ndb-connectstring", OPT_NDB_CONNECTSTRING, "Connect string for ndbcluster.",
(gptr*) &ndbcluster_connectstring, (gptr*) &ndbcluster_connectstring, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"new", 'n', "Use very new possible 'unsafe' functions.", {"new", 'n', "Use very new possible 'unsafe' functions.",
(gptr*) &global_system_variables.new_mode, (gptr*) &global_system_variables.new_mode,
(gptr*) &max_system_variables.new_mode, (gptr*) &max_system_variables.new_mode,
...@@ -5972,15 +5977,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -5972,15 +5977,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
} }
case OPT_BDB_SHARED: case OPT_BDB_SHARED:
berkeley_init_flags&= ~(DB_PRIVATE); berkeley_init_flags&= ~(DB_PRIVATE);
berkeley_shared_data=1; berkeley_shared_data= 1;
break; break;
#endif /* HAVE_BERKELEY_DB */ #endif /* HAVE_BERKELEY_DB */
case OPT_BDB: case OPT_BDB:
#ifdef HAVE_BERKELEY_DB #ifdef HAVE_BERKELEY_DB
if (opt_bdb) if (opt_bdb)
have_berkeley_db=SHOW_OPTION_YES; have_berkeley_db= SHOW_OPTION_YES;
else else
have_berkeley_db=SHOW_OPTION_DISABLED; have_berkeley_db= SHOW_OPTION_DISABLED;
#endif #endif
break; break;
case OPT_ISAM: case OPT_ISAM:
...@@ -5994,22 +5999,22 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -5994,22 +5999,22 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case OPT_NDBCLUSTER: case OPT_NDBCLUSTER:
#ifdef HAVE_NDBCLUSTER_DB #ifdef HAVE_NDBCLUSTER_DB
if (opt_ndbcluster) if (opt_ndbcluster)
have_ndbcluster=SHOW_OPTION_YES; have_ndbcluster= SHOW_OPTION_YES;
else else
have_ndbcluster=SHOW_OPTION_DISABLED; have_ndbcluster= SHOW_OPTION_DISABLED;
#endif #endif
break; break;
case OPT_INNODB: case OPT_INNODB:
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
if (opt_innodb) if (opt_innodb)
have_innodb=SHOW_OPTION_YES; have_innodb= SHOW_OPTION_YES;
else else
have_innodb=SHOW_OPTION_DISABLED; have_innodb= SHOW_OPTION_DISABLED;
#endif #endif
break; break;
case OPT_INNODB_DATA_FILE_PATH: case OPT_INNODB_DATA_FILE_PATH:
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
innobase_data_file_path=argument; innobase_data_file_path= argument;
#endif #endif
break; break;
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
......
...@@ -3215,6 +3215,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, ...@@ -3215,6 +3215,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
store_key **ref_key= j->ref.key_copy; store_key **ref_key= j->ref.key_copy;
byte *key_buff=j->ref.key_buff, *null_ref_key= 0; byte *key_buff=j->ref.key_buff, *null_ref_key= 0;
bool keyuse_uses_no_tables= true;
if (ftkey) if (ftkey)
{ {
j->ref.items[0]=((Item_func*)(keyuse->val))->key_item(); j->ref.items[0]=((Item_func*)(keyuse->val))->key_item();
...@@ -3234,6 +3235,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, ...@@ -3234,6 +3235,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
uint maybe_null= test(keyinfo->key_part[i].null_bit); uint maybe_null= test(keyinfo->key_part[i].null_bit);
j->ref.items[i]=keyuse->val; // Save for cond removal j->ref.items[i]=keyuse->val; // Save for cond removal
keyuse_uses_no_tables= keyuse_uses_no_tables & !keyuse->used_tables;
if (!keyuse->used_tables && if (!keyuse->used_tables &&
!(join->select_options & SELECT_DESCRIBE)) !(join->select_options & SELECT_DESCRIBE))
{ // Compare against constant { // Compare against constant
...@@ -3273,7 +3275,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, ...@@ -3273,7 +3275,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
j->type= null_ref_key ? JT_REF_OR_NULL : JT_REF; j->type= null_ref_key ? JT_REF_OR_NULL : JT_REF;
j->ref.null_ref_key= null_ref_key; j->ref.null_ref_key= null_ref_key;
} }
else if (ref_key == j->ref.key_copy) else if (keyuse_uses_no_tables)
{ {
/* /*
This happen if we are using a constant expression in the ON part This happen if we are using a constant expression in the ON part
...@@ -4062,7 +4064,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond, bool *simple_order) ...@@ -4062,7 +4064,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond, bool *simple_order)
} }
if ((ref=order_tables & (not_const_tables ^ first_table))) if ((ref=order_tables & (not_const_tables ^ first_table)))
{ {
if (only_eq_ref_tables(join,first_order,ref)) if (!(order_tables & first_table) && only_eq_ref_tables(join,first_order,ref))
{ {
DBUG_PRINT("info",("removing: %s", order->item[0]->full_name())); DBUG_PRINT("info",("removing: %s", order->item[0]->full_name()));
continue; continue;
...@@ -4184,7 +4186,10 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father, ...@@ -4184,7 +4186,10 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father,
Item *right_item= func->arguments()[1]; Item *right_item= func->arguments()[1];
Item_func::Functype functype= func->functype(); Item_func::Functype functype= func->functype();
if (right_item->eq(field,0) && left_item != value) if (right_item->eq(field,0) && left_item != value &&
(left_item->result_type() != STRING_RESULT ||
value->result_type() != STRING_RESULT ||
left_item->collation.collation == value->collation.collation))
{ {
Item *tmp=value->new_item(); Item *tmp=value->new_item();
if (tmp) if (tmp)
...@@ -4202,7 +4207,10 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father, ...@@ -4202,7 +4207,10 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father,
func->set_cmp_func(); func->set_cmp_func();
} }
} }
else if (left_item->eq(field,0) && right_item != value) else if (left_item->eq(field,0) && right_item != value &&
(right_item->result_type() != STRING_RESULT ||
value->result_type() != STRING_RESULT ||
right_item->collation.collation == value->collation.collation))
{ {
Item *tmp=value->new_item(); Item *tmp=value->new_item();
if (tmp) if (tmp)
...@@ -5003,16 +5011,21 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, ...@@ -5003,16 +5011,21 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
tmp_from_field++; tmp_from_field++;
*(reg_field++)= new_field; *(reg_field++)= new_field;
reclength+=new_field->pack_length(); reclength+=new_field->pack_length();
if (!(new_field->flags & NOT_NULL_FLAG))
null_count++;
if (new_field->flags & BLOB_FLAG) if (new_field->flags & BLOB_FLAG)
{ {
*blob_field++= new_field; *blob_field++= new_field;
blob_count++; blob_count++;
} }
((Item_sum*) item)->args[i]= new Item_field(new_field); ((Item_sum*) item)->args[i]= new Item_field(new_field);
if (((Item_sum*) item)->arg_count == 1) if (!(new_field->flags & NOT_NULL_FLAG))
((Item_sum*) item)->result_field= new_field; {
null_count++;
/*
new_field->maybe_null() is still false, it will be
changed below. But we have to setup Item_field correctly
*/
((Item_sum*) item)->args[i]->maybe_null=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