Below is the list of changes that have just been committed into a local
5.0 repository of justin.he. When justin.he does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-08 16:46:05+08:00, Justin.He@stripped +12 -0
BUG#19454, Some values of MaxNoOfTriggers can stop a server
the main modifications is following:
1. move the default parameter definition from ConfigInfo.cpp to a new header file
2. correct the segmentation fault when malloc mem in setSize() in ArrayPool.hpp
3. add a new mgmapi for map the parameter ID to it's corresponding name
4. modifiy something because the change of class 'ConfigInfo'
ndb/include/mgmapi/mgmapi.h@stripped, 2006-09-08 16:45:59+08:00,
Justin.He@stripped +1 -0
add a new function to get a configuration db parameter name mapping to its paramId
ndb/include/mgmapi/mgmapi_config_parameters.h@stripped, 2006-09-08 16:45:59+08:00,
Justin.He@stripped +65 -0
move some define macro from ConfigInfo.hpp to here,
then it's convenient to define a new struct of default parameter config info
ndb/include/mgmapi/mgmapi_config_parameters_array.h@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +2014 -0
New BitKeeper file ``ndb/include/mgmapi/mgmapi_config_parameters_array.h''
add the new header file to define the default parameters info, if we want to
modify something, we only need edit this header file
ndb/include/mgmapi/mgmapi_config_parameters_array.h@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +0 -0
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp@stripped, 2006-09-08 16:45:59+08:00,
Justin.He@stripped +1 -1
when call setSize(), pass a new argument(param ID) to the function, then if malloc
failed,
the error information will display the clear parameter's name
ndb/src/kernel/error/ErrorReporter.cpp@stripped, 2006-09-08 16:45:59+08:00,
Justin.He@stripped +11 -2
add initilization of a new static char* member 'errorParameterName' of class
ErrorReporter,
if failed, the errorParameterName will store the parameter name which cause malloc
failed
then we can format the error message, and display it in ndb_X_error.log (X is node id)
ndb/src/kernel/error/ErrorReporter.hpp@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +2 -0
add a new static member and corresponding function to class ErrorReporter, in order
to display clear error message about configuration parameter name
ndb/src/kernel/vm/ArrayPool.hpp@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +9 -3
the two 32-bit variable's multiplication could cause the variable's overflow,
it could cuase segmentation fault, then correct it.
ndb/src/mgmapi/mgmapi_configuration.cpp@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +16 -0
add a new mgmapi function implementation in here, then ndbd can call it to get
parameter's name by it's parameter ID
ndb/src/mgmsrv/Config.cpp@stripped, 2006-09-08 16:46:00+08:00, Justin.He@stripped
+9 -8
change some type, becuase of the changes of the ConfigInfo
ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +34 -2028
move something related to ParamInfo to a new header file in include/mgmapi/
then keep the only copy with ParamInfo, then if we edit some default values in
ParamInfo, we need modify one place.
ndb/src/mgmsrv/ConfigInfo.hpp@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +4 -33
move some definitions to include/mgmapi/mgmapi_config_parameters.h file
ndb/src/mgmsrv/InitConfigFileParser.cpp@stripped, 2006-09-08 16:46:00+08:00,
Justin.He@stripped +16 -15
correct some type because of the change of class ConfigInfo
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: Justin.He
# Host: qa3-104.qa.cn.tlan
# Root: /mnt/sda7/justin.he/mysql/mysql-5.0/bug19454-mysql-5.0
--- New file ---
+++ ndb/include/mgmapi/mgmapi_config_parameters_array.h 06/09/08 16:46:00
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef MGMAPI_CONFIG_PARAMETERS_ARRAY_H
#define MGMAPI_CONFIG_PARAMETERS_ARRAY_H
#ifndef MYSQLCLUSTERDIR
#define MYSQLCLUSTERDIR "."
#endif
#include <ndb_global.h>
#include "mgmapi_config_parameters.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* The defautl Configuration parameter initial information array
*
* Some are however given the value MANDATORY which means that the value
* must be specified in the configuration file.
*
* Min and max values are also given for some parameters.
* - Attr1: Name in file (initial config file)
* - Attr2: Name in prop (properties object)
* - Attr3: Name of Section (in init config file)
* - Attr4: Updateable
* - Attr5: Type of parameter (INT or BOOL)
* - Attr6: Default Value (number only)
* - Attr7: Min value
* - Attr8: Max value
*
* Parameter constraints are coded in file Config.cpp.
*
* *******************************************************************
* Parameters used under development should be marked "NOTIMPLEMENTED"
* *******************************************************************
*/
static const ParamInfo ParamInfoArray[]= {
/****************************************************************************
* COMPUTER
***************************************************************************/
{
KEY_INTERNAL,
"COMPUTER",
"COMPUTER",
"Computer section",
CI_INTERNAL,
false,
CI_SECTION,
0,
0, 0 },
{
KEY_INTERNAL,
"Id",
"COMPUTER",
"Name of computer",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
KEY_INTERNAL,
"HostName",
"COMPUTER",
"Hostname of computer (e.g. mysql.com)",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
KEY_INTERNAL,
"ByteOrder",
"COMPUTER",
0,
CI_DEPRICATED,
false,
CI_STRING,
UNDEFINED,
0,
0 },
/****************************************************************************
* SYSTEM
***************************************************************************/
{
CFG_SECTION_SYSTEM,
"SYSTEM",
"SYSTEM",
"System section",
CI_USED,
false,
CI_SECTION,
(const char *)CFG_SECTION_SYSTEM,
0, 0 },
{
CFG_SYS_NAME,
"Name",
"SYSTEM",
"Name of system (NDB Cluster)",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
CFG_SYS_PRIMARY_MGM_NODE,
"PrimaryMGMNode",
"SYSTEM",
"Node id of Primary "MGM_TOKEN_PRINT" node",
CI_USED,
false,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SYS_CONFIG_GENERATION,
"ConfigGenerationNumber",
"SYSTEM",
"Configuration generation number",
CI_USED,
false,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
/***************************************************************************
* DB
***************************************************************************/
{
CFG_SECTION_NODE,
DB_TOKEN,
DB_TOKEN,
"Node section",
CI_USED,
false,
CI_SECTION,
(const char *)NODE_TYPE_DB,
0, 0
},
{
CFG_NODE_HOST,
"HostName",
DB_TOKEN,
"Name of computer for this node",
CI_INTERNAL,
false,
CI_STRING,
"localhost",
0, 0 },
{
CFG_NODE_SYSTEM,
"System",
DB_TOKEN,
"Name of system for this node",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
KEY_INTERNAL,
"Id",
DB_TOKEN,
"",
CI_DEPRICATED,
false,
CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
{
CFG_NODE_ID,
"NodeId",
DB_TOKEN,
"Number identifying the database node ("DB_TOKEN_PRINT")",
CI_USED,
false,
CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
{
KEY_INTERNAL,
"ServerPort",
DB_TOKEN,
"Port used to setup transporter",
CI_USED,
false,
CI_INT,
UNDEFINED,
"1",
STR_VALUE(MAX_PORT_NO) },
{
CFG_DB_NO_REPLICAS,
"NoOfReplicas",
DB_TOKEN,
"Number of copies of all data in the database (1-4)",
CI_USED,
false,
CI_INT,
MANDATORY,
"1",
"4" },
{
CFG_DB_NO_ATTRIBUTES,
"MaxNoOfAttributes",
DB_TOKEN,
"Total number of attributes stored in database. I.e. sum over all tables",
CI_USED,
false,
CI_INT,
"1000",
"32",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_TABLES,
"MaxNoOfTables",
DB_TOKEN,
"Total number of tables stored in the database",
CI_USED,
false,
CI_INT,
"128",
"8",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_ORDERED_INDEXES,
"MaxNoOfOrderedIndexes",
DB_TOKEN,
"Total number of ordered indexes that can be defined in the system",
CI_USED,
false,
CI_INT,
"128",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_UNIQUE_HASH_INDEXES,
"MaxNoOfUniqueHashIndexes",
DB_TOKEN,
"Total number of unique hash indexes that can be defined in the system",
CI_USED,
false,
CI_INT,
"64",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_INDEXES,
"MaxNoOfIndexes",
DB_TOKEN,
"Total number of indexes that can be defined in the system",
CI_DEPRICATED,
false,
CI_INT,
"128",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_INDEX_OPS,
"MaxNoOfConcurrentIndexOperations",
DB_TOKEN,
"Total number of index operations that can execute simultaneously on one
"DB_TOKEN_PRINT" node",
CI_USED,
false,
CI_INT,
"8K",
"0",
STR_VALUE(MAX_INT_RNIL)
},
{
CFG_DB_NO_TRIGGERS,
"MaxNoOfTriggers",
DB_TOKEN,
"Total number of triggers that can be defined in the system",
CI_USED,
false,
CI_INT,
"768",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_TRIGGER_OPS,
"MaxNoOfFiredTriggers",
DB_TOKEN,
"Total number of triggers that can fire simultaneously in one "DB_TOKEN_PRINT" node",
CI_USED,
false,
CI_INT,
"4000",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
KEY_INTERNAL,
"ExecuteOnComputer",
DB_TOKEN,
"String referencing an earlier defined COMPUTER",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_DB_NO_SAVE_MSGS,
"MaxNoOfSavedMessages",
DB_TOKEN,
"Max number of error messages in error log and max number of trace files",
CI_USED,
true,
CI_INT,
"25",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_MEMLOCK,
"LockPagesInMainMemory",
DB_TOKEN,
"If set to yes, then NDB Cluster data will not be swapped out to disk",
CI_USED,
true,
CI_BOOL,
"false",
"false",
"true" },
{
CFG_DB_WATCHDOG_INTERVAL,
"TimeBetweenWatchDogCheck",
DB_TOKEN,
"Time between execution checks inside a database node",
CI_USED,
true,
CI_INT,
"6000",
"70",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_STOP_ON_ERROR,
"StopOnError",
DB_TOKEN,
"If set to N, "DB_TOKEN_PRINT" automatically restarts/recovers in case of node
failure",
CI_USED,
true,
CI_BOOL,
"true",
"false",
"true" },
{
CFG_DB_STOP_ON_ERROR_INSERT,
"RestartOnErrorInsert",
DB_TOKEN,
"See src/kernel/vm/Emulator.hpp NdbRestartType for details",
CI_INTERNAL,
true,
CI_INT,
"2",
"0",
"4" },
{
CFG_DB_NO_OPS,
"MaxNoOfConcurrentOperations",
DB_TOKEN,
"Max number of operation records in transaction coordinator",
CI_USED,
false,
CI_INT,
"32k",
"32",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_LOCAL_OPS,
"MaxNoOfLocalOperations",
DB_TOKEN,
"Max number of operation records defined in the local storage node",
CI_USED,
false,
CI_INT,
UNDEFINED,
"32",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_LOCAL_SCANS,
"MaxNoOfLocalScans",
DB_TOKEN,
"Max number of fragment scans in parallel in the local storage node",
CI_USED,
false,
CI_INT,
UNDEFINED,
"32",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_BATCH_SIZE,
"BatchSizePerLocalScan",
DB_TOKEN,
"Used to calculate the number of lock records for scan with hold lock",
CI_USED,
false,
CI_INT,
STR_VALUE(DEF_BATCH_SIZE),
"1",
STR_VALUE(MAX_PARALLEL_OP_PER_SCAN) },
{
CFG_DB_NO_TRANSACTIONS,
"MaxNoOfConcurrentTransactions",
DB_TOKEN,
"Max number of transaction executing concurrently on the "DB_TOKEN_PRINT" node",
CI_USED,
false,
CI_INT,
"4096",
"32",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_NO_SCANS,
"MaxNoOfConcurrentScans",
DB_TOKEN,
"Max number of scans executing concurrently on the "DB_TOKEN_PRINT" node",
CI_USED,
false,
CI_INT,
"256",
"2",
"500" },
{
CFG_DB_TRANS_BUFFER_MEM,
"TransactionBufferMemory",
DB_TOKEN,
"Dynamic buffer space (in bytes) for key and attribute data allocated for each
"DB_TOKEN_PRINT" node",
CI_USED,
false,
CI_INT,
"1M",
"1K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_INDEX_MEM,
"IndexMemory",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for storing indexes",
CI_USED,
false,
CI_INT64,
"18M",
"1M",
"1024G" },
{
CFG_DB_DATA_MEM,
"DataMemory",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for storing data",
CI_USED,
false,
CI_INT64,
"80M",
"1M",
"1024G" },
{
CFG_DB_UNDO_INDEX_BUFFER,
"UndoIndexBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for writing UNDO logs for index
part",
CI_USED,
false,
CI_INT,
"2M",
"1M",
STR_VALUE(MAX_INT_RNIL)},
{
CFG_DB_UNDO_DATA_BUFFER,
"UndoDataBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for writing UNDO logs for data
part",
CI_USED,
false,
CI_INT,
"16M",
"1M",
STR_VALUE(MAX_INT_RNIL)},
{
CFG_DB_REDO_BUFFER,
"RedoBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for writing REDO logs",
CI_USED,
false,
CI_INT,
"8M",
"1M",
STR_VALUE(MAX_INT_RNIL)},
{
CFG_DB_LONG_SIGNAL_BUFFER,
"LongMessageBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for internal long messages",
CI_USED,
false,
CI_INT,
"1M",
"512k",
STR_VALUE(MAX_INT_RNIL)},
{
CFG_DB_START_PARTIAL_TIMEOUT,
"StartPartialTimeout",
DB_TOKEN,
"Time to wait before trying to start wo/ all nodes. 0=Wait forever",
CI_USED,
true,
CI_INT,
"30000",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_START_PARTITION_TIMEOUT,
"StartPartitionedTimeout",
DB_TOKEN,
"Time to wait before trying to start partitioned. 0=Wait forever",
CI_USED,
true,
CI_INT,
"60000",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_START_FAILURE_TIMEOUT,
"StartFailureTimeout",
DB_TOKEN,
"Time to wait before terminating. 0=Wait forever",
CI_USED,
true,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_HEARTBEAT_INTERVAL,
"HeartbeatIntervalDbDb",
DB_TOKEN,
"Time between "DB_TOKEN_PRINT"-"DB_TOKEN_PRINT" heartbeats. "DB_TOKEN_PRINT" considered
dead after 3 missed HBs",
CI_USED,
true,
CI_INT,
"1500",
"10",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_API_HEARTBEAT_INTERVAL,
"HeartbeatIntervalDbApi",
DB_TOKEN,
"Time between "API_TOKEN_PRINT"-"DB_TOKEN_PRINT" heartbeats. "API_TOKEN_PRINT"
connection closed after 3 missed HBs",
CI_USED,
true,
CI_INT,
"1500",
"100",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_LCP_INTERVAL,
"TimeBetweenLocalCheckpoints",
DB_TOKEN,
"Time between taking snapshots of the database (expressed in 2log of bytes)",
CI_USED,
true,
CI_INT,
"20",
"0",
"31" },
{
CFG_DB_GCP_INTERVAL,
"TimeBetweenGlobalCheckpoints",
DB_TOKEN,
"Time between doing group commit of transactions to disk",
CI_USED,
true,
CI_INT,
"2000",
"10",
"32000" },
{
CFG_DB_NO_REDOLOG_FILES,
"NoOfFragmentLogFiles",
DB_TOKEN,
"No of 16 Mbyte Redo log files in each of 4 file sets belonging to "DB_TOKEN_PRINT"
node",
CI_USED,
false,
CI_INT,
"8",
"3",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_MAX_OPEN_FILES,
"MaxNoOfOpenFiles",
DB_TOKEN,
"Max number of files open per "DB_TOKEN_PRINT" node.(One thread is created per file)",
CI_USED,
false,
CI_INT,
"40",
"20",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_TRANSACTION_CHECK_INTERVAL,
"TimeBetweenInactiveTransactionAbortCheck",
DB_TOKEN,
"Time between inactive transaction checks",
CI_USED,
true,
CI_INT,
"1000",
"1000",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_TRANSACTION_INACTIVE_TIMEOUT,
"TransactionInactiveTimeout",
DB_TOKEN,
"Time application can wait before executing another transaction part (ms).\n"
"This is the time the transaction coordinator waits for the application\n"
"to execute or send another part (query, statement) of the transaction.\n"
"If the application takes too long time, the transaction gets aborted.\n"
"Timeout set to 0 means that we don't timeout at all on application wait.",
CI_USED,
true,
CI_INT,
STR_VALUE(MAX_INT_RNIL),
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT,
"TransactionDeadlockDetectionTimeout",
DB_TOKEN,
"Time transaction can be executing in a DB node (ms).\n"
"This is the time the transaction coordinator waits for each database node\n"
"of the transaction to execute a request. If the database node takes too\n"
"long time, the transaction gets aborted.",
CI_USED,
true,
CI_INT,
"1200",
"50",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_LCP_DISC_PAGES_TUP_SR,
"NoOfDiskPagesToDiskDuringRestartTUP",
DB_TOKEN,
"?",
CI_USED,
true,
CI_INT,
"40",
"1",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_LCP_DISC_PAGES_TUP,
"NoOfDiskPagesToDiskAfterRestartTUP",
DB_TOKEN,
"?",
CI_USED,
true,
CI_INT,
"40",
"1",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_LCP_DISC_PAGES_ACC_SR,
"NoOfDiskPagesToDiskDuringRestartACC",
DB_TOKEN,
"?",
CI_USED,
true,
CI_INT,
"20",
"1",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_LCP_DISC_PAGES_ACC,
"NoOfDiskPagesToDiskAfterRestartACC",
DB_TOKEN,
"?",
CI_USED,
true,
CI_INT,
"20",
"1",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_DISCLESS,
"Diskless",
DB_TOKEN,
"Run wo/ disk",
CI_USED,
true,
CI_BOOL,
"false",
"false",
"true"},
{
KEY_INTERNAL,
"Discless",
DB_TOKEN,
"Diskless",
CI_DEPRICATED,
true,
CI_BOOL,
"false",
"false",
"true"},
{
CFG_DB_ARBIT_TIMEOUT,
"ArbitrationTimeout",
DB_TOKEN,
"Max time (milliseconds) database partion waits for arbitration signal",
CI_USED,
false,
CI_INT,
"3000",
"10",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_NODE_DATADIR,
"DataDir",
DB_TOKEN,
"Data directory for this node",
CI_USED,
false,
CI_STRING,
MYSQLCLUSTERDIR,
0, 0 },
{
CFG_DB_FILESYSTEM_PATH,
"FileSystemPath",
DB_TOKEN,
"Path to directory where the "DB_TOKEN_PRINT" node stores its data (directory must
exist)",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_LOGLEVEL_STARTUP,
"LogLevelStartup",
DB_TOKEN,
"Node startup info printed on stdout",
CI_USED,
false,
CI_INT,
"1",
"0",
"15" },
{
CFG_LOGLEVEL_SHUTDOWN,
"LogLevelShutdown",
DB_TOKEN,
"Node shutdown info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_STATISTICS,
"LogLevelStatistic",
DB_TOKEN,
"Transaction, operation, transporter info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_CHECKPOINT,
"LogLevelCheckpoint",
DB_TOKEN,
"Local and Global checkpoint info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_NODERESTART,
"LogLevelNodeRestart",
DB_TOKEN,
"Node restart, node failure info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_CONNECTION,
"LogLevelConnection",
DB_TOKEN,
"Node connect/disconnect info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_CONGESTION,
"LogLevelCongestion",
DB_TOKEN,
"Congestion info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_ERROR,
"LogLevelError",
DB_TOKEN,
"Transporter, heartbeat errors printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
{
CFG_LOGLEVEL_INFO,
"LogLevelInfo",
DB_TOKEN,
"Heartbeat and log info printed on stdout",
CI_USED,
false,
CI_INT,
"0",
"0",
"15" },
/**
* Backup
*/
{
CFG_DB_PARALLEL_BACKUPS,
"ParallelBackups",
DB_TOKEN,
"Maximum number of parallel backups",
CI_NOTIMPLEMENTED,
false,
CI_INT,
"1",
"1",
"1" },
{
CFG_DB_BACKUP_DATADIR,
"BackupDataDir",
DB_TOKEN,
"Path to where to store backups",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_DB_BACKUP_MEM,
"BackupMemory",
DB_TOKEN,
"Total memory allocated for backups per node (in bytes)",
CI_USED,
false,
CI_INT,
"4M", // sum of BackupDataBufferSize and BackupLogBufferSize
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_BACKUP_DATA_BUFFER_MEM,
"BackupDataBufferSize",
DB_TOKEN,
"Default size of databuffer for a backup (in bytes)",
CI_USED,
false,
CI_INT,
"2M", // remember to change BackupMemory
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_BACKUP_LOG_BUFFER_MEM,
"BackupLogBufferSize",
DB_TOKEN,
"Default size of logbuffer for a backup (in bytes)",
CI_USED,
false,
CI_INT,
"2M", // remember to change BackupMemory
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_BACKUP_WRITE_SIZE,
"BackupWriteSize",
DB_TOKEN,
"Default size of filesystem writes made by backup (in bytes)",
CI_USED,
false,
CI_INT,
"32K",
"2K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_BACKUP_MAX_WRITE_SIZE,
"BackupMaxWriteSize",
DB_TOKEN,
"Max size of filesystem writes made by backup (in bytes)",
CI_USED,
false,
CI_INT,
"256K",
"2K",
STR_VALUE(MAX_INT_RNIL) },
/***************************************************************************
* API
***************************************************************************/
{
CFG_SECTION_NODE,
API_TOKEN,
API_TOKEN,
"Node section",
CI_USED,
false,
CI_SECTION,
(const char *)NODE_TYPE_API,
0, 0
},
{
CFG_NODE_HOST,
"HostName",
API_TOKEN,
"Name of computer for this node",
CI_INTERNAL,
false,
CI_STRING,
"",
0, 0 },
{
CFG_NODE_SYSTEM,
"System",
API_TOKEN,
"Name of system for this node",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
KEY_INTERNAL,
"Id",
API_TOKEN,
"",
CI_DEPRICATED,
false,
CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
{
CFG_NODE_ID,
"NodeId",
API_TOKEN,
"Number identifying application node ("API_TOKEN_PRINT")",
CI_USED,
false,
CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
{
KEY_INTERNAL,
"ExecuteOnComputer",
API_TOKEN,
"String referencing an earlier defined COMPUTER",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_NODE_ARBIT_RANK,
"ArbitrationRank",
API_TOKEN,
"If 0, then "API_TOKEN_PRINT" is not arbitrator. Kernel selects arbitrators in order 1,
2",
CI_USED,
false,
CI_INT,
"0",
"0",
"2" },
{
CFG_NODE_ARBIT_DELAY,
"ArbitrationDelay",
API_TOKEN,
"When asked to arbitrate, arbitrator waits this long before voting (msec)",
CI_USED,
false,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_MAX_SCAN_BATCH_SIZE,
"MaxScanBatchSize",
"API",
"The maximum collective batch size for one scan",
CI_USED,
false,
CI_INT,
STR_VALUE(MAX_SCAN_BATCH_SIZE),
"32k",
"16M" },
{
CFG_BATCH_BYTE_SIZE,
"BatchByteSize",
"API",
"The default batch size in bytes",
CI_USED,
false,
CI_INT,
STR_VALUE(SCAN_BATCH_SIZE),
"1k",
"1M" },
{
CFG_BATCH_SIZE,
"BatchSize",
"API",
"The default batch size in number of records",
CI_USED,
false,
CI_INT,
STR_VALUE(DEF_BATCH_SIZE),
"1",
STR_VALUE(MAX_PARALLEL_OP_PER_SCAN) },
/****************************************************************************
* MGM
***************************************************************************/
{
CFG_SECTION_NODE,
MGM_TOKEN,
MGM_TOKEN,
"Node section",
CI_USED,
false,
CI_SECTION,
(const char *)NODE_TYPE_MGM,
0, 0
},
{
CFG_NODE_HOST,
"HostName",
MGM_TOKEN,
"Name of computer for this node",
CI_INTERNAL,
false,
CI_STRING,
"",
0, 0 },
{
CFG_NODE_DATADIR,
"DataDir",
MGM_TOKEN,
"Data directory for this node",
CI_USED,
false,
CI_STRING,
MYSQLCLUSTERDIR,
0, 0 },
{
CFG_NODE_SYSTEM,
"System",
MGM_TOKEN,
"Name of system for this node",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
KEY_INTERNAL,
"Id",
MGM_TOKEN,
"",
CI_DEPRICATED,
false,
CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
{
CFG_NODE_ID,
"NodeId",
MGM_TOKEN,
"Number identifying the management server node ("MGM_TOKEN_PRINT")",
CI_USED,
false,
CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
{
CFG_LOG_DESTINATION,
"LogDestination",
MGM_TOKEN,
"String describing where logmessages are sent",
CI_USED,
false,
CI_STRING,
0,
0, 0 },
{
KEY_INTERNAL,
"ExecuteOnComputer",
MGM_TOKEN,
"String referencing an earlier defined COMPUTER",
CI_USED,
false,
CI_STRING,
0,
0, 0 },
{
KEY_INTERNAL,
"MaxNoOfSavedEvents",
MGM_TOKEN,
"",
CI_USED,
false,
CI_INT,
"100",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_MGM_PORT,
"PortNumber",
MGM_TOKEN,
"Port number to give commands to/fetch configurations from management server",
CI_USED,
false,
CI_INT,
NDB_PORT,
"0",
STR_VALUE(MAX_PORT_NO) },
{
KEY_INTERNAL,
"PortNumberStats",
MGM_TOKEN,
"Port number used to get statistical information from a management server",
CI_USED,
false,
CI_INT,
UNDEFINED,
"0",
STR_VALUE(MAX_PORT_NO) },
{
CFG_NODE_ARBIT_RANK,
"ArbitrationRank",
MGM_TOKEN,
"If 0, then "MGM_TOKEN_PRINT" is not arbitrator. Kernel selects arbitrators in order 1,
2",
CI_USED,
false,
CI_INT,
"1",
"0",
"2" },
{
CFG_NODE_ARBIT_DELAY,
"ArbitrationDelay",
MGM_TOKEN,
"",
CI_USED,
false,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
/****************************************************************************
* TCP
***************************************************************************/
{
CFG_SECTION_CONNECTION,
"TCP",
"TCP",
"Connection section",
CI_USED,
false,
CI_SECTION,
(const char *)CONNECTION_TYPE_TCP,
0, 0
},
{
CFG_CONNECTION_HOSTNAME_1,
"HostName1",
"TCP",
"Name/IP of computer on one side of the connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_HOSTNAME_2,
"HostName2",
"TCP",
"Name/IP of computer on one side of the connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_1,
"NodeId1",
"TCP",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
CFG_CONNECTION_NODE_2,
"NodeId2",
"TCP",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
CFG_CONNECTION_GROUP,
"Group",
"TCP",
"",
CI_USED,
false,
CI_INT,
"55",
"0", "200" },
{
CFG_CONNECTION_NODE_ID_SERVER,
"NodeIdServer",
"TCP",
"",
CI_USED,
false,
CI_INT,
MANDATORY,
"1", "63" },
{
CFG_CONNECTION_SEND_SIGNAL_ID,
"SendSignalId",
"TCP",
"Sends id in each signal. Used in trace files.",
CI_USED,
false,
CI_BOOL,
"true",
"false",
"true" },
{
CFG_CONNECTION_CHECKSUM,
"Checksum",
"TCP",
"If checksum is enabled, all signals between nodes are checked for errors",
CI_USED,
false,
CI_BOOL,
"false",
"false",
"true" },
{
CFG_CONNECTION_SERVER_PORT,
"PortNumber",
"TCP",
"Port used for this transporter",
CI_USED,
false,
CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_PORT_NO) },
{
CFG_TCP_SEND_BUFFER_SIZE,
"SendBufferMemory",
"TCP",
"Bytes of buffer for signals sent from this node",
CI_USED,
false,
CI_INT,
"256K",
"64K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_TCP_RECEIVE_BUFFER_SIZE,
"ReceiveBufferMemory",
"TCP",
"Bytes of buffer for signals received by this node",
CI_USED,
false,
CI_INT,
"64K",
"16K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_TCP_PROXY,
"Proxy",
"TCP",
"",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_1_SYSTEM,
"NodeId1_System",
"TCP",
"System for node 1 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_2_SYSTEM,
"NodeId2_System",
"TCP",
"System for node 2 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
/****************************************************************************
* SHM
***************************************************************************/
{
CFG_SECTION_CONNECTION,
"SHM",
"SHM",
"Connection section",
CI_USED,
false,
CI_SECTION,
(const char *)CONNECTION_TYPE_SHM,
0, 0 },
{
CFG_CONNECTION_HOSTNAME_1,
"HostName1",
"SHM",
"Name/IP of computer on one side of the connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_HOSTNAME_2,
"HostName2",
"SHM",
"Name/IP of computer on one side of the connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_SERVER_PORT,
"PortNumber",
"SHM",
"Port used for this transporter",
CI_USED,
false,
CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_PORT_NO) },
{
CFG_SHM_SIGNUM,
"Signum",
"SHM",
"Signum to be used for signalling",
CI_USED,
false,
CI_INT,
UNDEFINED,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_NODE_1,
"NodeId1",
"SHM",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
CFG_CONNECTION_NODE_2,
"NodeId2",
"SHM",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_STRING,
MANDATORY,
0, 0 },
{
CFG_CONNECTION_GROUP,
"Group",
"SHM",
"",
CI_USED,
false,
CI_INT,
"35",
"0", "200" },
{
CFG_CONNECTION_NODE_ID_SERVER,
"NodeIdServer",
"SHM",
"",
CI_USED,
false,
CI_INT,
MANDATORY,
"1", "63" },
{
CFG_CONNECTION_SEND_SIGNAL_ID,
"SendSignalId",
"SHM",
"Sends id in each signal. Used in trace files.",
CI_USED,
false,
CI_BOOL,
"false",
"false",
"true" },
{
CFG_CONNECTION_CHECKSUM,
"Checksum",
"SHM",
"If checksum is enabled, all signals between nodes are checked for errors",
CI_USED,
false,
CI_BOOL,
"true",
"false",
"true" },
{
CFG_SHM_KEY,
"ShmKey",
"SHM",
"A shared memory key",
CI_USED,
false,
CI_INT,
UNDEFINED,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SHM_BUFFER_MEM,
"ShmSize",
"SHM",
"Size of shared memory segment",
CI_USED,
false,
CI_INT,
"1M",
"64K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_NODE_1_SYSTEM,
"NodeId1_System",
"SHM",
"System for node 1 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_2_SYSTEM,
"NodeId2_System",
"SHM",
"System for node 2 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
/****************************************************************************
* SCI
***************************************************************************/
{
CFG_SECTION_CONNECTION,
"SCI",
"SCI",
"Connection section",
CI_USED,
false,
CI_SECTION,
(const char *)CONNECTION_TYPE_SCI,
0, 0
},
{
CFG_CONNECTION_NODE_1,
"NodeId1",
"SCI",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_STRING,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_NODE_2,
"NodeId2",
"SCI",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_STRING,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_GROUP,
"Group",
"SCI",
"",
CI_USED,
false,
CI_INT,
"15",
"0", "200" },
{
CFG_CONNECTION_NODE_ID_SERVER,
"NodeIdServer",
"SCI",
"",
CI_USED,
false,
CI_INT,
MANDATORY,
"1", "63" },
{
CFG_CONNECTION_HOSTNAME_1,
"HostName1",
"SCI",
"Name/IP of computer on one side of the connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_HOSTNAME_2,
"HostName2",
"SCI",
"Name/IP of computer on one side of the connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_SERVER_PORT,
"PortNumber",
"SCI",
"Port used for this transporter",
CI_USED,
false,
CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_PORT_NO) },
{
CFG_SCI_HOST1_ID_0,
"Host1SciId0",
"SCI",
"SCI-node id for adapter 0 on Host1 (a computer can have two adapters)",
CI_USED,
false,
CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SCI_HOST1_ID_1,
"Host1SciId1",
"SCI",
"SCI-node id for adapter 1 on Host1 (a computer can have two adapters)",
CI_USED,
false,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SCI_HOST2_ID_0,
"Host2SciId0",
"SCI",
"SCI-node id for adapter 0 on Host2 (a computer can have two adapters)",
CI_USED,
false,
CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SCI_HOST2_ID_1,
"Host2SciId1",
"SCI",
"SCI-node id for adapter 1 on Host2 (a computer can have two adapters)",
CI_USED,
false,
CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_SEND_SIGNAL_ID,
"SendSignalId",
"SCI",
"Sends id in each signal. Used in trace files.",
CI_USED,
false,
CI_BOOL,
"true",
"false",
"true" },
{
CFG_CONNECTION_CHECKSUM,
"Checksum",
"SCI",
"If checksum is enabled, all signals between nodes are checked for errors",
CI_USED,
false,
CI_BOOL,
"false",
"false",
"true" },
{
CFG_SCI_SEND_LIMIT,
"SendLimit",
"SCI",
"Transporter send buffer contents are sent when this no of bytes is buffered",
CI_USED,
false,
CI_INT,
"8K",
"128",
"32K" },
{
CFG_SCI_BUFFER_MEM,
"SharedBufferSize",
"SCI",
"Size of shared memory segment",
CI_USED,
false,
CI_INT,
"1M",
"64K",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_NODE_1_SYSTEM,
"NodeId1_System",
"SCI",
"System for node 1 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_2_SYSTEM,
"NodeId2_System",
"SCI",
"System for node 2 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
/****************************************************************************
* OSE
***************************************************************************/
{
CFG_SECTION_CONNECTION,
"OSE",
"OSE",
"Connection section",
CI_USED,
false,
CI_SECTION,
(const char *)CONNECTION_TYPE_OSE,
0, 0
},
{
CFG_CONNECTION_HOSTNAME_1,
"HostName1",
"OSE",
"Name of computer on one side of the connection",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_HOSTNAME_2,
"HostName2",
"OSE",
"Name of computer on one side of the connection",
CI_USED,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_1,
"NodeId1",
"OSE",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_NODE_2,
"NodeId2",
"OSE",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
CI_USED,
false,
CI_INT,
UNDEFINED,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_SEND_SIGNAL_ID,
"SendSignalId",
"OSE",
"Sends id in each signal. Used in trace files.",
CI_USED,
false,
CI_BOOL,
"true",
"false",
"true" },
{
CFG_CONNECTION_CHECKSUM,
"Checksum",
"OSE",
"If checksum is enabled, all signals between nodes are checked for errors",
CI_USED,
false,
CI_BOOL,
"false",
"false",
"true" },
{
CFG_OSE_PRIO_A_SIZE,
"PrioASignalSize",
"OSE",
"Size of priority A signals (in bytes)",
CI_USED,
false,
CI_INT,
"1000",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_OSE_PRIO_B_SIZE,
"PrioBSignalSize",
"OSE",
"Size of priority B signals (in bytes)",
CI_USED,
false,
CI_INT,
"1000",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_OSE_RECEIVE_ARRAY_SIZE,
"ReceiveArraySize",
"OSE",
"Number of OSE signals checked for correct ordering (in no of OSE signals)",
CI_USED,
false,
CI_INT,
"10",
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_CONNECTION_NODE_1_SYSTEM,
"NodeId1_System",
"OSE",
"System for node 1 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_NODE_2_SYSTEM,
"NodeId2_System",
"OSE",
"System for node 2 in connection",
CI_INTERNAL,
false,
CI_STRING,
UNDEFINED,
0, 0 },
};
#ifdef __cplusplus
}
#endif
#endif
--- 1.21/ndb/include/mgmapi/mgmapi_config_parameters.h 2006-09-08 16:46:19 +08:00
+++ 1.22/ndb/include/mgmapi/mgmapi_config_parameters.h 2006-09-08 16:46:19 +08:00
@@ -177,4 +177,69 @@
#define CONNECTION_TYPE_SCI 2
#define CONNECTION_TYPE_OSE 3
+#define LENGTH_PARAMETER_NAME 100
+#define NULL_PARAMETER_NAME ""
+#define NULL_PARAMETER_ID 0
+
+#define KEY_INTERNAL 0
+#define MAX_INT_RNIL 0xfffffeff
+#define MAX_PORT_NO 65535
+
+#define _STR_VALUE(x) #x
+#define STR_VALUE(x) _STR_VALUE(x)
+
+#define DB_TOKEN_PRINT "ndbd(DB)"
+#define MGM_TOKEN_PRINT "ndb_mgmd(MGM)"
+#define API_TOKEN_PRINT "mysqld(API)"
+
+#define DB_TOKEN "DB"
+#define MGM_TOKEN "MGM"
+#define API_TOKEN "API"
+
+/**
+ * A MANDATORY parameters must be specified in the config file
+ * An UNDEFINED parameter may or may not be specified in the config file
+ */
+static const char* MANDATORY = (char*)~(UintPtr)0;// Default value for mandatory params.
+static const char* UNDEFINED = 0; // Default value for undefined params.
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /**
+ * The Configuration parameter type and status
+ */
+
+ enum ParameterType { CI_BOOL, CI_INT, CI_INT64, CI_STRING, CI_SECTION };
+ enum ParameterStatus { CI_USED, ///< Active
+ CI_DEPRICATED, ///< Can be, but shouldn't
+ CI_NOTIMPLEMENTED, ///< Is ignored.
+ CI_INTERNAL ///< Not configurable by the user
+ };
+
+ /**
+ * Entry for one configuration parameter
+ */
+ typedef struct _paramInfo {
+ Uint32 _paramId;
+ const char* _fname;
+ const char* _section;
+ const char* _description;
+ ParameterStatus _status;
+ bool _updateable;
+ ParameterType _type;
+ const char* _default;
+ const char* _min;
+ const char* _max;
+ }ParamInfo;
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
#endif
--- 1.3/ndb/src/mgmapi/mgmapi_configuration.cpp 2006-09-08 16:46:19 +08:00
+++ 1.4/ndb/src/mgmapi/mgmapi_configuration.cpp 2006-09-08 16:46:19 +08:00
@@ -1,6 +1,7 @@
#include <ndb_types.h>
#include <mgmapi.h>
#include "mgmapi_configuration.hpp"
+#include <mgmapi_config_parameters_array.h>
ndb_mgm_configuration_iterator::ndb_mgm_configuration_iterator
(const ndb_mgm_configuration & conf, unsigned type_of_section)
@@ -154,4 +155,19 @@
ndb_mgm_find(ndb_mgm_configuration_iterator* iter,
int param, unsigned search){
return iter->find(param, search);
+}
+
+extern "C"
+int
+ndb_mgm_get_db_parameter_name(const Uint32 paramId, char* paramName){
+ int noOfParam = sizeof(ParamInfoArray) / sizeof(ParamInfo);
+
+ for (int i = 0; i < noOfParam; i++) {
+ if ( paramId == ParamInfoArray[i]._paramId && strcmp(DB_TOKEN,
ParamInfoArray[i]._section) == 0) {
+ BaseString:snprintf(paramName, LENGTH_PARAMETER_NAME, "%s",
ParamInfoArray[i]._fname);
+ return 0;
+ }
+ }
+
+ return -1;
}
--- 1.49/ndb/include/mgmapi/mgmapi.h 2006-09-08 16:46:19 +08:00
+++ 1.50/ndb/include/mgmapi/mgmapi.h 2006-09-08 16:46:19 +08:00
@@ -1111,6 +1111,7 @@
int ndb_mgm_check_connection(NdbMgmHandle handle);
int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length);
+ int ndb_mgm_get_db_parameter_name(const Uint32 paramId, char* paramName);
#endif
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
--- 1.7/ndb/src/mgmsrv/Config.cpp 2006-09-08 16:46:19 +08:00
+++ 1.8/ndb/src/mgmsrv/Config.cpp 2006-09-08 16:46:19 +08:00
@@ -19,6 +19,7 @@
#include <string.h>
#include "MgmtErrorReporter.hpp"
#include <Properties.hpp>
+#include <mgmapi_config_parameters.h>
//*****************************************************************************
// Ctor / Dtor
@@ -53,27 +54,27 @@
if(!section->contains(n))
continue;
- if (m_info.getStatus(section, n) == ConfigInfo::CI_INTERNAL)
+ if (m_info.getStatus(section, n) == CI_INTERNAL)
continue;
- if (m_info.getStatus(section, n) == ConfigInfo::CI_DEPRICATED)
+ if (m_info.getStatus(section, n) == CI_DEPRICATED)
continue;
- if (m_info.getStatus(section, n) == ConfigInfo::CI_NOTIMPLEMENTED)
+ if (m_info.getStatus(section, n) == CI_NOTIMPLEMENTED)
continue;
out << n << ": ";
switch (m_info.getType(section, n)) {
- case ConfigInfo::CI_INT:
+ case CI_INT:
MGM_REQUIRE(prop->get(n, &int_value));
out << int_value;
break;
- case ConfigInfo::CI_INT64:
+ case CI_INT64:
MGM_REQUIRE(prop->get(n, &int_64));
out << int_64;
break;
- case ConfigInfo::CI_BOOL:
+ case CI_BOOL:
MGM_REQUIRE(prop->get(n, &int_value));
if (int_value) {
out << "Y";
@@ -81,11 +82,11 @@
out << "N";
}
break;
- case ConfigInfo::CI_STRING:
+ case CI_STRING:
MGM_REQUIRE(prop->get(n, &str_value));
out << str_value;
break;
- case ConfigInfo::CI_SECTION:
+ case CI_SECTION:
out << "SECTION";
break;
}
--- 1.80/ndb/src/mgmsrv/ConfigInfo.cpp 2006-09-08 16:46:19 +08:00
+++ 1.81/ndb/src/mgmsrv/ConfigInfo.cpp 2006-09-08 16:46:19 +08:00
@@ -20,6 +20,7 @@
#include <NdbTCP.h>
#include "ConfigInfo.hpp"
#include <mgmapi_config_parameters.h>
+#include <mgmapi_config_parameters_array.h>
#include <ndb_limits.h>
#include "InitConfigFileParser.hpp"
#include <m_string.h>
@@ -28,24 +29,6 @@
extern my_bool opt_core;
#define MAX_LINE_LENGTH 255
-#define KEY_INTERNAL 0
-#define MAX_INT_RNIL 0xfffffeff
-#define MAX_PORT_NO 65535
-
-#define _STR_VALUE(x) #x
-#define STR_VALUE(x) _STR_VALUE(x)
-
-/****************************************************************************
- * Section names
- ****************************************************************************/
-
-#define DB_TOKEN_PRINT "ndbd(DB)"
-#define MGM_TOKEN_PRINT "ndb_mgmd(MGM)"
-#define API_TOKEN_PRINT "mysqld(API)"
-
-#define DB_TOKEN "DB"
-#define MGM_TOKEN "MGM"
-#define API_TOKEN "API"
const ConfigInfo::AliasPair
ConfigInfo::m_sectionNameAliases[]={
@@ -229,1987 +212,9 @@
{ 0, 0, 0, 0, 0}
};
-/**
- * The default constructors create objects with suitable values for the
- * configuration parameters.
- *
- * Some are however given the value MANDATORY which means that the value
- * must be specified in the configuration file.
- *
- * Min and max values are also given for some parameters.
- * - Attr1: Name in file (initial config file)
- * - Attr2: Name in prop (properties object)
- * - Attr3: Name of Section (in init config file)
- * - Attr4: Updateable
- * - Attr5: Type of parameter (INT or BOOL)
- * - Attr6: Default Value (number only)
- * - Attr7: Min value
- * - Attr8: Max value
- *
- * Parameter constraints are coded in file Config.cpp.
- *
- * *******************************************************************
- * Parameters used under development should be marked "NOTIMPLEMENTED"
- * *******************************************************************
- */
-
-const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
-
- /****************************************************************************
- * COMPUTER
- ***************************************************************************/
- {
- KEY_INTERNAL,
- "COMPUTER",
- "COMPUTER",
- "Computer section",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_SECTION,
- 0,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "Id",
- "COMPUTER",
- "Name of computer",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "HostName",
- "COMPUTER",
- "Hostname of computer (e.g. mysql.com)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "ByteOrder",
- "COMPUTER",
- 0,
- ConfigInfo::CI_DEPRICATED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0,
- 0 },
-
- /****************************************************************************
- * SYSTEM
- ***************************************************************************/
- {
- CFG_SECTION_SYSTEM,
- "SYSTEM",
- "SYSTEM",
- "System section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)CFG_SECTION_SYSTEM,
- 0, 0 },
-
- {
- CFG_SYS_NAME,
- "Name",
- "SYSTEM",
- "Name of system (NDB Cluster)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- CFG_SYS_PRIMARY_MGM_NODE,
- "PrimaryMGMNode",
- "SYSTEM",
- "Node id of Primary "MGM_TOKEN_PRINT" node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_SYS_CONFIG_GENERATION,
- "ConfigGenerationNumber",
- "SYSTEM",
- "Configuration generation number",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- /***************************************************************************
- * DB
- ***************************************************************************/
- {
- CFG_SECTION_NODE,
- DB_TOKEN,
- DB_TOKEN,
- "Node section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)NODE_TYPE_DB,
- 0, 0
- },
-
- {
- CFG_NODE_HOST,
- "HostName",
- DB_TOKEN,
- "Name of computer for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- "localhost",
- 0, 0 },
-
- {
- CFG_NODE_SYSTEM,
- "System",
- DB_TOKEN,
- "Name of system for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "Id",
- DB_TOKEN,
- "",
- ConfigInfo::CI_DEPRICATED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- CFG_NODE_ID,
- "NodeId",
- DB_TOKEN,
- "Number identifying the database node ("DB_TOKEN_PRINT")",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- KEY_INTERNAL,
- "ServerPort",
- DB_TOKEN,
- "Port used to setup transporter",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "1",
- STR_VALUE(MAX_PORT_NO) },
-
- {
- CFG_DB_NO_REPLICAS,
- "NoOfReplicas",
- DB_TOKEN,
- "Number of copies of all data in the database (1-4)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- "4" },
-
- {
- CFG_DB_NO_ATTRIBUTES,
- "MaxNoOfAttributes",
- DB_TOKEN,
- "Total number of attributes stored in database. I.e. sum over all tables",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1000",
- "32",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_TABLES,
- "MaxNoOfTables",
- DB_TOKEN,
- "Total number of tables stored in the database",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "128",
- "8",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_ORDERED_INDEXES,
- "MaxNoOfOrderedIndexes",
- DB_TOKEN,
- "Total number of ordered indexes that can be defined in the system",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "128",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_UNIQUE_HASH_INDEXES,
- "MaxNoOfUniqueHashIndexes",
- DB_TOKEN,
- "Total number of unique hash indexes that can be defined in the system",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "64",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_INDEXES,
- "MaxNoOfIndexes",
- DB_TOKEN,
- "Total number of indexes that can be defined in the system",
- ConfigInfo::CI_DEPRICATED,
- false,
- ConfigInfo::CI_INT,
- "128",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_INDEX_OPS,
- "MaxNoOfConcurrentIndexOperations",
- DB_TOKEN,
- "Total number of index operations that can execute simultaneously on one
"DB_TOKEN_PRINT" node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "8K",
- "0",
- STR_VALUE(MAX_INT_RNIL)
- },
-
- {
- CFG_DB_NO_TRIGGERS,
- "MaxNoOfTriggers",
- DB_TOKEN,
- "Total number of triggers that can be defined in the system",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "768",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_TRIGGER_OPS,
- "MaxNoOfFiredTriggers",
- DB_TOKEN,
- "Total number of triggers that can fire simultaneously in one "DB_TOKEN_PRINT" node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "4000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- KEY_INTERNAL,
- "ExecuteOnComputer",
- DB_TOKEN,
- "String referencing an earlier defined COMPUTER",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_DB_NO_SAVE_MSGS,
- "MaxNoOfSavedMessages",
- DB_TOKEN,
- "Max number of error messages in error log and max number of trace files",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "25",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_MEMLOCK,
- "LockPagesInMainMemory",
- DB_TOKEN,
- "If set to yes, then NDB Cluster data will not be swapped out to disk",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
-
- {
- CFG_DB_WATCHDOG_INTERVAL,
- "TimeBetweenWatchDogCheck",
- DB_TOKEN,
- "Time between execution checks inside a database node",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "6000",
- "70",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_STOP_ON_ERROR,
- "StopOnError",
- DB_TOKEN,
- "If set to N, "DB_TOKEN_PRINT" automatically restarts/recovers in case of node
failure",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_BOOL,
- "true",
- "false",
- "true" },
-
- {
- CFG_DB_STOP_ON_ERROR_INSERT,
- "RestartOnErrorInsert",
- DB_TOKEN,
- "See src/kernel/vm/Emulator.hpp NdbRestartType for details",
- ConfigInfo::CI_INTERNAL,
- true,
- ConfigInfo::CI_INT,
- "2",
- "0",
- "4" },
-
- {
- CFG_DB_NO_OPS,
- "MaxNoOfConcurrentOperations",
- DB_TOKEN,
- "Max number of operation records in transaction coordinator",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "32k",
- "32",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_LOCAL_OPS,
- "MaxNoOfLocalOperations",
- DB_TOKEN,
- "Max number of operation records defined in the local storage node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "32",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_LOCAL_SCANS,
- "MaxNoOfLocalScans",
- DB_TOKEN,
- "Max number of fragment scans in parallel in the local storage node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "32",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_BATCH_SIZE,
- "BatchSizePerLocalScan",
- DB_TOKEN,
- "Used to calculate the number of lock records for scan with hold lock",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- STR_VALUE(DEF_BATCH_SIZE),
- "1",
- STR_VALUE(MAX_PARALLEL_OP_PER_SCAN) },
-
- {
- CFG_DB_NO_TRANSACTIONS,
- "MaxNoOfConcurrentTransactions",
- DB_TOKEN,
- "Max number of transaction executing concurrently on the "DB_TOKEN_PRINT" node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "4096",
- "32",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_NO_SCANS,
- "MaxNoOfConcurrentScans",
- DB_TOKEN,
- "Max number of scans executing concurrently on the "DB_TOKEN_PRINT" node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "256",
- "2",
- "500" },
-
- {
- CFG_DB_TRANS_BUFFER_MEM,
- "TransactionBufferMemory",
- DB_TOKEN,
- "Dynamic buffer space (in bytes) for key and attribute data allocated for each
"DB_TOKEN_PRINT" node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1M",
- "1K",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_INDEX_MEM,
- "IndexMemory",
- DB_TOKEN,
- "Number bytes on each "DB_TOKEN_PRINT" node allocated for storing indexes",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT64,
- "18M",
- "1M",
- "1024G" },
-
- {
- CFG_DB_DATA_MEM,
- "DataMemory",
- DB_TOKEN,
- "Number bytes on each "DB_TOKEN_PRINT" node allocated for storing data",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT64,
- "80M",
- "1M",
- "1024G" },
-
- {
- CFG_DB_UNDO_INDEX_BUFFER,
- "UndoIndexBuffer",
- DB_TOKEN,
- "Number bytes on each "DB_TOKEN_PRINT" node allocated for writing UNDO logs for index
part",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "2M",
- "1M",
- STR_VALUE(MAX_INT_RNIL)},
-
- {
- CFG_DB_UNDO_DATA_BUFFER,
- "UndoDataBuffer",
- DB_TOKEN,
- "Number bytes on each "DB_TOKEN_PRINT" node allocated for writing UNDO logs for data
part",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "16M",
- "1M",
- STR_VALUE(MAX_INT_RNIL)},
-
- {
- CFG_DB_REDO_BUFFER,
- "RedoBuffer",
- DB_TOKEN,
- "Number bytes on each "DB_TOKEN_PRINT" node allocated for writing REDO logs",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "8M",
- "1M",
- STR_VALUE(MAX_INT_RNIL)},
-
- {
- CFG_DB_LONG_SIGNAL_BUFFER,
- "LongMessageBuffer",
- DB_TOKEN,
- "Number bytes on each "DB_TOKEN_PRINT" node allocated for internal long messages",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1M",
- "512k",
- STR_VALUE(MAX_INT_RNIL)},
-
- {
- CFG_DB_START_PARTIAL_TIMEOUT,
- "StartPartialTimeout",
- DB_TOKEN,
- "Time to wait before trying to start wo/ all nodes. 0=Wait forever",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "30000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_START_PARTITION_TIMEOUT,
- "StartPartitionedTimeout",
- DB_TOKEN,
- "Time to wait before trying to start partitioned. 0=Wait forever",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "60000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_START_FAILURE_TIMEOUT,
- "StartFailureTimeout",
- DB_TOKEN,
- "Time to wait before terminating. 0=Wait forever",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_HEARTBEAT_INTERVAL,
- "HeartbeatIntervalDbDb",
- DB_TOKEN,
- "Time between "DB_TOKEN_PRINT"-"DB_TOKEN_PRINT" heartbeats. "DB_TOKEN_PRINT"
considered dead after 3 missed HBs",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "1500",
- "10",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_API_HEARTBEAT_INTERVAL,
- "HeartbeatIntervalDbApi",
- DB_TOKEN,
- "Time between "API_TOKEN_PRINT"-"DB_TOKEN_PRINT" heartbeats. "API_TOKEN_PRINT"
connection closed after 3 missed HBs",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "1500",
- "100",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_LCP_INTERVAL,
- "TimeBetweenLocalCheckpoints",
- DB_TOKEN,
- "Time between taking snapshots of the database (expressed in 2log of bytes)",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "20",
- "0",
- "31" },
-
- {
- CFG_DB_GCP_INTERVAL,
- "TimeBetweenGlobalCheckpoints",
- DB_TOKEN,
- "Time between doing group commit of transactions to disk",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "2000",
- "10",
- "32000" },
-
- {
- CFG_DB_NO_REDOLOG_FILES,
- "NoOfFragmentLogFiles",
- DB_TOKEN,
- "No of 16 Mbyte Redo log files in each of 4 file sets belonging to "DB_TOKEN_PRINT"
node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "8",
- "3",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_MAX_OPEN_FILES,
- "MaxNoOfOpenFiles",
- DB_TOKEN,
- "Max number of files open per "DB_TOKEN_PRINT" node.(One thread is created per
file)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "40",
- "20",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_TRANSACTION_CHECK_INTERVAL,
- "TimeBetweenInactiveTransactionAbortCheck",
- DB_TOKEN,
- "Time between inactive transaction checks",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "1000",
- "1000",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_TRANSACTION_INACTIVE_TIMEOUT,
- "TransactionInactiveTimeout",
- DB_TOKEN,
- "Time application can wait before executing another transaction part (ms).\n"
- "This is the time the transaction coordinator waits for the application\n"
- "to execute or send another part (query, statement) of the transaction.\n"
- "If the application takes too long time, the transaction gets aborted.\n"
- "Timeout set to 0 means that we don't timeout at all on application wait.",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- STR_VALUE(MAX_INT_RNIL),
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT,
- "TransactionDeadlockDetectionTimeout",
- DB_TOKEN,
- "Time transaction can be executing in a DB node (ms).\n"
- "This is the time the transaction coordinator waits for each database node\n"
- "of the transaction to execute a request. If the database node takes too\n"
- "long time, the transaction gets aborted.",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "1200",
- "50",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_LCP_DISC_PAGES_TUP_SR,
- "NoOfDiskPagesToDiskDuringRestartTUP",
- DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "40",
- "1",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_LCP_DISC_PAGES_TUP,
- "NoOfDiskPagesToDiskAfterRestartTUP",
- DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "40",
- "1",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_LCP_DISC_PAGES_ACC_SR,
- "NoOfDiskPagesToDiskDuringRestartACC",
- DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "20",
- "1",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_LCP_DISC_PAGES_ACC,
- "NoOfDiskPagesToDiskAfterRestartACC",
- DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "20",
- "1",
- STR_VALUE(MAX_INT_RNIL) },
-
-
- {
- CFG_DB_DISCLESS,
- "Diskless",
- DB_TOKEN,
- "Run wo/ disk",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true"},
-
- {
- KEY_INTERNAL,
- "Discless",
- DB_TOKEN,
- "Diskless",
- ConfigInfo::CI_DEPRICATED,
- true,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true"},
-
-
-
- {
- CFG_DB_ARBIT_TIMEOUT,
- "ArbitrationTimeout",
- DB_TOKEN,
- "Max time (milliseconds) database partion waits for arbitration signal",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "3000",
- "10",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_NODE_DATADIR,
- "DataDir",
- DB_TOKEN,
- "Data directory for this node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MYSQLCLUSTERDIR,
- 0, 0 },
-
- {
- CFG_DB_FILESYSTEM_PATH,
- "FileSystemPath",
- DB_TOKEN,
- "Path to directory where the "DB_TOKEN_PRINT" node stores its data (directory must
exist)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_LOGLEVEL_STARTUP,
- "LogLevelStartup",
- DB_TOKEN,
- "Node startup info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_SHUTDOWN,
- "LogLevelShutdown",
- DB_TOKEN,
- "Node shutdown info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_STATISTICS,
- "LogLevelStatistic",
- DB_TOKEN,
- "Transaction, operation, transporter info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_CHECKPOINT,
- "LogLevelCheckpoint",
- DB_TOKEN,
- "Local and Global checkpoint info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_NODERESTART,
- "LogLevelNodeRestart",
- DB_TOKEN,
- "Node restart, node failure info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_CONNECTION,
- "LogLevelConnection",
- DB_TOKEN,
- "Node connect/disconnect info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_CONGESTION,
- "LogLevelCongestion",
- DB_TOKEN,
- "Congestion info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_ERROR,
- "LogLevelError",
- DB_TOKEN,
- "Transporter, heartbeat errors printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- {
- CFG_LOGLEVEL_INFO,
- "LogLevelInfo",
- DB_TOKEN,
- "Heartbeat and log info printed on stdout",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "15" },
-
- /**
- * Backup
- */
- {
- CFG_DB_PARALLEL_BACKUPS,
- "ParallelBackups",
- DB_TOKEN,
- "Maximum number of parallel backups",
- ConfigInfo::CI_NOTIMPLEMENTED,
- false,
- ConfigInfo::CI_INT,
- "1",
- "1",
- "1" },
-
- {
- CFG_DB_BACKUP_DATADIR,
- "BackupDataDir",
- DB_TOKEN,
- "Path to where to store backups",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_DB_BACKUP_MEM,
- "BackupMemory",
- DB_TOKEN,
- "Total memory allocated for backups per node (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "4M", // sum of BackupDataBufferSize and BackupLogBufferSize
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_BACKUP_DATA_BUFFER_MEM,
- "BackupDataBufferSize",
- DB_TOKEN,
- "Default size of databuffer for a backup (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "2M", // remember to change BackupMemory
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_BACKUP_LOG_BUFFER_MEM,
- "BackupLogBufferSize",
- DB_TOKEN,
- "Default size of logbuffer for a backup (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "2M", // remember to change BackupMemory
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_BACKUP_WRITE_SIZE,
- "BackupWriteSize",
- DB_TOKEN,
- "Default size of filesystem writes made by backup (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "32K",
- "2K",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_DB_BACKUP_MAX_WRITE_SIZE,
- "BackupMaxWriteSize",
- DB_TOKEN,
- "Max size of filesystem writes made by backup (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "256K",
- "2K",
- STR_VALUE(MAX_INT_RNIL) },
-
- /***************************************************************************
- * API
- ***************************************************************************/
- {
- CFG_SECTION_NODE,
- API_TOKEN,
- API_TOKEN,
- "Node section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)NODE_TYPE_API,
- 0, 0
- },
-
- {
- CFG_NODE_HOST,
- "HostName",
- API_TOKEN,
- "Name of computer for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- "",
- 0, 0 },
-
- {
- CFG_NODE_SYSTEM,
- "System",
- API_TOKEN,
- "Name of system for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "Id",
- API_TOKEN,
- "",
- ConfigInfo::CI_DEPRICATED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- CFG_NODE_ID,
- "NodeId",
- API_TOKEN,
- "Number identifying application node ("API_TOKEN_PRINT")",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- KEY_INTERNAL,
- "ExecuteOnComputer",
- API_TOKEN,
- "String referencing an earlier defined COMPUTER",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_NODE_ARBIT_RANK,
- "ArbitrationRank",
- API_TOKEN,
- "If 0, then "API_TOKEN_PRINT" is not arbitrator. Kernel selects arbitrators in order
1, 2",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- "2" },
-
- {
- CFG_NODE_ARBIT_DELAY,
- "ArbitrationDelay",
- API_TOKEN,
- "When asked to arbitrate, arbitrator waits this long before voting (msec)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_MAX_SCAN_BATCH_SIZE,
- "MaxScanBatchSize",
- "API",
- "The maximum collective batch size for one scan",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- STR_VALUE(MAX_SCAN_BATCH_SIZE),
- "32k",
- "16M" },
-
- {
- CFG_BATCH_BYTE_SIZE,
- "BatchByteSize",
- "API",
- "The default batch size in bytes",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- STR_VALUE(SCAN_BATCH_SIZE),
- "1k",
- "1M" },
-
- {
- CFG_BATCH_SIZE,
- "BatchSize",
- "API",
- "The default batch size in number of records",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- STR_VALUE(DEF_BATCH_SIZE),
- "1",
- STR_VALUE(MAX_PARALLEL_OP_PER_SCAN) },
-
- /****************************************************************************
- * MGM
- ***************************************************************************/
- {
- CFG_SECTION_NODE,
- MGM_TOKEN,
- MGM_TOKEN,
- "Node section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)NODE_TYPE_MGM,
- 0, 0
- },
-
- {
- CFG_NODE_HOST,
- "HostName",
- MGM_TOKEN,
- "Name of computer for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- "",
- 0, 0 },
-
- {
- CFG_NODE_DATADIR,
- "DataDir",
- MGM_TOKEN,
- "Data directory for this node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MYSQLCLUSTERDIR,
- 0, 0 },
-
- {
- CFG_NODE_SYSTEM,
- "System",
- MGM_TOKEN,
- "Name of system for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "Id",
- MGM_TOKEN,
- "",
- ConfigInfo::CI_DEPRICATED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- CFG_NODE_ID,
- "NodeId",
- MGM_TOKEN,
- "Number identifying the management server node ("MGM_TOKEN_PRINT")",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- CFG_LOG_DESTINATION,
- "LogDestination",
- MGM_TOKEN,
- "String describing where logmessages are sent",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- 0,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "ExecuteOnComputer",
- MGM_TOKEN,
- "String referencing an earlier defined COMPUTER",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- 0,
- 0, 0 },
-
- {
- KEY_INTERNAL,
- "MaxNoOfSavedEvents",
- MGM_TOKEN,
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "100",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_MGM_PORT,
- "PortNumber",
- MGM_TOKEN,
- "Port number to give commands to/fetch configurations from management server",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- NDB_PORT,
- "0",
- STR_VALUE(MAX_PORT_NO) },
-
- {
- KEY_INTERNAL,
- "PortNumberStats",
- MGM_TOKEN,
- "Port number used to get statistical information from a management server",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "0",
- STR_VALUE(MAX_PORT_NO) },
-
- {
- CFG_NODE_ARBIT_RANK,
- "ArbitrationRank",
- MGM_TOKEN,
- "If 0, then "MGM_TOKEN_PRINT" is not arbitrator. Kernel selects arbitrators in order
1, 2",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1",
- "0",
- "2" },
-
- {
- CFG_NODE_ARBIT_DELAY,
- "ArbitrationDelay",
- MGM_TOKEN,
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- /****************************************************************************
- * TCP
- ***************************************************************************/
- {
- CFG_SECTION_CONNECTION,
- "TCP",
- "TCP",
- "Connection section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)CONNECTION_TYPE_TCP,
- 0, 0
- },
-
- {
- CFG_CONNECTION_HOSTNAME_1,
- "HostName1",
- "TCP",
- "Name/IP of computer on one side of the connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_HOSTNAME_2,
- "HostName2",
- "TCP",
- "Name/IP of computer on one side of the connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_1,
- "NodeId1",
- "TCP",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2,
- "NodeId2",
- "TCP",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- CFG_CONNECTION_GROUP,
- "Group",
- "TCP",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "55",
- "0", "200" },
-
- {
- CFG_CONNECTION_NODE_ID_SERVER,
- "NodeIdServer",
- "TCP",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1", "63" },
-
- {
- CFG_CONNECTION_SEND_SIGNAL_ID,
- "SendSignalId",
- "TCP",
- "Sends id in each signal. Used in trace files.",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "true",
- "false",
- "true" },
-
-
- {
- CFG_CONNECTION_CHECKSUM,
- "Checksum",
- "TCP",
- "If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
-
- {
- CFG_CONNECTION_SERVER_PORT,
- "PortNumber",
- "TCP",
- "Port used for this transporter",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_PORT_NO) },
-
- {
- CFG_TCP_SEND_BUFFER_SIZE,
- "SendBufferMemory",
- "TCP",
- "Bytes of buffer for signals sent from this node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "256K",
- "64K",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_TCP_RECEIVE_BUFFER_SIZE,
- "ReceiveBufferMemory",
- "TCP",
- "Bytes of buffer for signals received by this node",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "64K",
- "16K",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_TCP_PROXY,
- "Proxy",
- "TCP",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_1_SYSTEM,
- "NodeId1_System",
- "TCP",
- "System for node 1 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2_SYSTEM,
- "NodeId2_System",
- "TCP",
- "System for node 2 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
-
- /****************************************************************************
- * SHM
- ***************************************************************************/
- {
- CFG_SECTION_CONNECTION,
- "SHM",
- "SHM",
- "Connection section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)CONNECTION_TYPE_SHM,
- 0, 0 },
-
- {
- CFG_CONNECTION_HOSTNAME_1,
- "HostName1",
- "SHM",
- "Name/IP of computer on one side of the connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_HOSTNAME_2,
- "HostName2",
- "SHM",
- "Name/IP of computer on one side of the connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_SERVER_PORT,
- "PortNumber",
- "SHM",
- "Port used for this transporter",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_PORT_NO) },
-
- {
- CFG_SHM_SIGNUM,
- "Signum",
- "SHM",
- "Signum to be used for signalling",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_1,
- "NodeId1",
- "SHM",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2,
- "NodeId2",
- "SHM",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- CFG_CONNECTION_GROUP,
- "Group",
- "SHM",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "35",
- "0", "200" },
-
- {
- CFG_CONNECTION_NODE_ID_SERVER,
- "NodeIdServer",
- "SHM",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1", "63" },
-
- {
- CFG_CONNECTION_SEND_SIGNAL_ID,
- "SendSignalId",
- "SHM",
- "Sends id in each signal. Used in trace files.",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
-
-
- {
- CFG_CONNECTION_CHECKSUM,
- "Checksum",
- "SHM",
- "If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "true",
- "false",
- "true" },
-
- {
- CFG_SHM_KEY,
- "ShmKey",
- "SHM",
- "A shared memory key",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_SHM_BUFFER_MEM,
- "ShmSize",
- "SHM",
- "Size of shared memory segment",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1M",
- "64K",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_1_SYSTEM,
- "NodeId1_System",
- "SHM",
- "System for node 1 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2_SYSTEM,
- "NodeId2_System",
- "SHM",
- "System for node 2 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- /****************************************************************************
- * SCI
- ***************************************************************************/
- {
- CFG_SECTION_CONNECTION,
- "SCI",
- "SCI",
- "Connection section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)CONNECTION_TYPE_SCI,
- 0, 0
- },
-
- {
- CFG_CONNECTION_NODE_1,
- "NodeId1",
- "SCI",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_2,
- "NodeId2",
- "SCI",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_GROUP,
- "Group",
- "SCI",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "15",
- "0", "200" },
-
- {
- CFG_CONNECTION_NODE_ID_SERVER,
- "NodeIdServer",
- "SCI",
- "",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1", "63" },
-
- {
- CFG_CONNECTION_HOSTNAME_1,
- "HostName1",
- "SCI",
- "Name/IP of computer on one side of the connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_HOSTNAME_2,
- "HostName2",
- "SCI",
- "Name/IP of computer on one side of the connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_SERVER_PORT,
- "PortNumber",
- "SCI",
- "Port used for this transporter",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_PORT_NO) },
-
- {
- CFG_SCI_HOST1_ID_0,
- "Host1SciId0",
- "SCI",
- "SCI-node id for adapter 0 on Host1 (a computer can have two adapters)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_SCI_HOST1_ID_1,
- "Host1SciId1",
- "SCI",
- "SCI-node id for adapter 1 on Host1 (a computer can have two adapters)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_SCI_HOST2_ID_0,
- "Host2SciId0",
- "SCI",
- "SCI-node id for adapter 0 on Host2 (a computer can have two adapters)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_SCI_HOST2_ID_1,
- "Host2SciId1",
- "SCI",
- "SCI-node id for adapter 1 on Host2 (a computer can have two adapters)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "0",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_SEND_SIGNAL_ID,
- "SendSignalId",
- "SCI",
- "Sends id in each signal. Used in trace files.",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "true",
- "false",
- "true" },
-
- {
- CFG_CONNECTION_CHECKSUM,
- "Checksum",
- "SCI",
- "If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
-
- {
- CFG_SCI_SEND_LIMIT,
- "SendLimit",
- "SCI",
- "Transporter send buffer contents are sent when this no of bytes is buffered",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "8K",
- "128",
- "32K" },
-
- {
- CFG_SCI_BUFFER_MEM,
- "SharedBufferSize",
- "SCI",
- "Size of shared memory segment",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1M",
- "64K",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_1_SYSTEM,
- "NodeId1_System",
- "SCI",
- "System for node 1 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2_SYSTEM,
- "NodeId2_System",
- "SCI",
- "System for node 2 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- /****************************************************************************
- * OSE
- ***************************************************************************/
- {
- CFG_SECTION_CONNECTION,
- "OSE",
- "OSE",
- "Connection section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)CONNECTION_TYPE_OSE,
- 0, 0
- },
-
- {
- CFG_CONNECTION_HOSTNAME_1,
- "HostName1",
- "OSE",
- "Name of computer on one side of the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_HOSTNAME_2,
- "HostName2",
- "OSE",
- "Name of computer on one side of the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_1,
- "NodeId1",
- "OSE",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_2,
- "NodeId2",
- "OSE",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of
the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_SEND_SIGNAL_ID,
- "SendSignalId",
- "OSE",
- "Sends id in each signal. Used in trace files.",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "true",
- "false",
- "true" },
-
- {
- CFG_CONNECTION_CHECKSUM,
- "Checksum",
- "OSE",
- "If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
-
- {
- CFG_OSE_PRIO_A_SIZE,
- "PrioASignalSize",
- "OSE",
- "Size of priority A signals (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_OSE_PRIO_B_SIZE,
- "PrioBSignalSize",
- "OSE",
- "Size of priority B signals (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_OSE_RECEIVE_ARRAY_SIZE,
- "ReceiveArraySize",
- "OSE",
- "Number of OSE signals checked for correct ordering (in no of OSE signals)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "10",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_1_SYSTEM,
- "NodeId1_System",
- "OSE",
- "System for node 1 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2_SYSTEM,
- "NodeId2_System",
- "OSE",
- "System for node 2 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-};
+const ParamInfo* ConfigInfo::m_ParamInfo = (ParamInfo*)ParamInfoArray;
-const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo);
+const int ConfigInfo::m_NoOfParams = sizeof(ParamInfoArray) / sizeof(ParamInfo);
/****************************************************************************
@@ -2302,7 +307,8 @@
m_info.put(param._section, section, true);
delete section;
- if(param._type != ConfigInfo::CI_SECTION){
+ //if(param._type != ConfigInfo::CI_SECTION){
+ if(param._type != CI_SECTION){
Properties * p;
if(!m_systemDefaults.getCopy(param._section, &p)){
p = new Properties(true);
@@ -2346,7 +352,7 @@
require(false);
}
- if(m_ParamInfo[i]._type == ConfigInfo::CI_SECTION)
+ if(m_ParamInfo[i]._type == CI_SECTION)
continue;
const Properties * p = getInfo(m_ParamInfo[i]._section);
@@ -2487,14 +493,14 @@
return false;
}
-ConfigInfo::Type
+ParameterType
ConfigInfo::getType(const Properties * section, const char* fname) const {
- return (ConfigInfo::Type) getInfoInt(section, fname, "Type");
+ return (ParameterType) getInfoInt(section, fname, "Type");
}
-ConfigInfo::Status
+ParameterStatus
ConfigInfo::getStatus(const Properties * section, const char* fname) const {
- return (ConfigInfo::Status) getInfoInt(section, fname, "Status");
+ return (ParameterStatus) getInfoInt(section, fname, "Status");
}
/****************************************************************************
@@ -2514,9 +520,9 @@
Properties::Iterator it(sec);
for (const char* n = it.first(); n != NULL; n = it.next()) {
// Skip entries with different F- and P-names
- if (getStatus(sec, n) == ConfigInfo::CI_INTERNAL) continue;
- if (getStatus(sec, n) == ConfigInfo::CI_DEPRICATED) continue;
- if (getStatus(sec, n) == ConfigInfo::CI_NOTIMPLEMENTED) continue;
+ if (getStatus(sec, n) == CI_INTERNAL) continue;
+ if (getStatus(sec, n) == CI_DEPRICATED) continue;
+ if (getStatus(sec, n) == CI_NOTIMPLEMENTED) continue;
print(sec, n);
}
}
@@ -2526,7 +532,7 @@
ndbout << parameter;
// ndbout << getDescription(section, parameter) << endl;
switch (getType(section, parameter)) {
- case ConfigInfo::CI_BOOL:
+ case CI_BOOL:
ndbout << " (Boolean value)" << endl;
ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == false) {
@@ -2541,8 +547,8 @@
ndbout << endl;
break;
- case ConfigInfo::CI_INT:
- case ConfigInfo::CI_INT64:
+ case CI_INT:
+ case CI_INT64:
ndbout << " (Non-negative Integer)" << endl;
ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
@@ -2557,7 +563,7 @@
ndbout << endl;
break;
- case ConfigInfo::CI_STRING:
+ case CI_STRING:
ndbout << " (String)" << endl;
ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
@@ -2567,7 +573,7 @@
}
ndbout << endl;
break;
- case ConfigInfo::CI_SECTION:
+ case CI_SECTION:
break;
}
}
@@ -2842,32 +848,32 @@
Properties::Iterator it(defaults);
for(const char * name = it.first(); name != NULL; name = it.next()){
- ConfigInfo::Status st = ctx.m_info->getStatus(ctx.m_currentInfo, name);
+ ParameterStatus st = ctx.m_info->getStatus(ctx.m_currentInfo, name);
if(!ctx.m_currentSection->contains(name)){
switch (ctx.m_info->getType(ctx.m_currentInfo, name)){
- case ConfigInfo::CI_INT:
- case ConfigInfo::CI_BOOL:{
+ case CI_INT:
+ case CI_BOOL:{
Uint32 val = 0;
::require(defaults->get(name, &val));
ctx.m_currentSection->put(name, val);
DBUG_PRINT("info",("%s=%d #default",name,val));
break;
}
- case ConfigInfo::CI_INT64:{
+ case CI_INT64:{
Uint64 val = 0;
::require(defaults->get(name, &val));
ctx.m_currentSection->put64(name, val);
DBUG_PRINT("info",("%s=%lld #default",name,val));
break;
}
- case ConfigInfo::CI_STRING:{
+ case CI_STRING:{
const char * val;
::require(defaults->get(name, &val));
ctx.m_currentSection->put(name, val);
DBUG_PRINT("info",("%s=%s #default",name,val));
break;
}
- case ConfigInfo::CI_SECTION:
+ case CI_SECTION:
break;
}
}
@@ -2875,26 +881,26 @@
else
{
switch (ctx.m_info->getType(ctx.m_currentInfo, name)){
- case ConfigInfo::CI_INT:
- case ConfigInfo::CI_BOOL:{
+ case CI_INT:
+ case CI_BOOL:{
Uint32 val = 0;
::require(ctx.m_currentSection->get(name, &val));
DBUG_PRINT("info",("%s=%d",name,val));
break;
}
- case ConfigInfo::CI_INT64:{
+ case CI_INT64:{
Uint64 val = 0;
::require(ctx.m_currentSection->get(name, &val));
DBUG_PRINT("info",("%s=%lld",name,val));
break;
}
- case ConfigInfo::CI_STRING:{
+ case CI_STRING:{
const char * val;
::require(ctx.m_currentSection->get(name, &val));
DBUG_PRINT("info",("%s=%s",name,val));
break;
}
- case ConfigInfo::CI_SECTION:
+ case CI_SECTION:
break;
}
}
@@ -3316,10 +1322,10 @@
PropertiesType oldType;
require(ctx.m_currentSection->getTypeOf(oldName, &oldType));
- ConfigInfo::Type newType = ctx.m_info->getType(ctx.m_currentInfo, newName);
+ ParameterType newType = ctx.m_info->getType(ctx.m_currentInfo, newName);
if(!((oldType == PropertiesType_Uint32 || oldType == PropertiesType_Uint64)
- && (newType == ConfigInfo::CI_INT || newType == ConfigInfo::CI_INT64 ||
newType == ConfigInfo::CI_BOOL))){
+ && (newType == CI_INT || newType == CI_INT64 || newType == CI_BOOL))){
ndbout << "oldType: " << (int)oldType << ", newType: " <<
(int)newType << endl;
ctx.reportError("Unable to handle type conversion w.r.t deprication %s %s"
"- [%s] starting at line: %d",
@@ -3339,9 +1345,9 @@
return false;
}
- if(newType == ConfigInfo::CI_INT || newType == ConfigInfo::CI_BOOL){
+ if(newType == CI_INT || newType == CI_BOOL){
require(dst.put(newName, (Uint32)newVal));
- } else if(newType == ConfigInfo::CI_INT64) {
+ } else if(newType == CI_INT64) {
require(dst.put64(newName, newVal));
}
return true;
@@ -3425,7 +1431,7 @@
require(sec->get("Status", &status));
require(sec->get("SectionType", &typeVal));
- if(id == KEY_INTERNAL || status == ConfigInfo::CI_INTERNAL){
+ if(id == KEY_INTERNAL || status == CI_INTERNAL){
ndbout_c("skipping section %s", ctx.fname);
break;
}
--- 1.11/ndb/src/mgmsrv/ConfigInfo.hpp 2006-09-08 16:46:19 +08:00
+++ 1.12/ndb/src/mgmsrv/ConfigInfo.hpp 2006-09-08 16:46:19 +08:00
@@ -22,13 +22,7 @@
#include <ndb_limits.h>
#include <NdbOut.hpp>
#include "InitConfigFileParser.hpp"
-
-/**
- * A MANDATORY parameters must be specified in the config file
- * An UNDEFINED parameter may or may not be specified in the config file
- */
-static const char* MANDATORY = (char*)~(UintPtr)0;// Default value for mandatory params.
-static const char* UNDEFINED = 0; // Default value for undefined params.
+#include <mgmapi_config_parameters.h>
/**
* @class ConfigInfo
@@ -38,29 +32,6 @@
*/
class ConfigInfo {
public:
- enum Type { CI_BOOL, CI_INT, CI_INT64, CI_STRING, CI_SECTION };
- enum Status { CI_USED, ///< Active
- CI_DEPRICATED, ///< Can be, but shouldn't
- CI_NOTIMPLEMENTED, ///< Is ignored.
- CI_INTERNAL ///< Not configurable by the user
- };
-
- /**
- * Entry for one configuration parameter
- */
- struct ParamInfo {
- Uint32 _paramId;
- const char* _fname;
- const char* _section;
- const char* _description;
- Status _status;
- bool _updateable;
- Type _type;
- const char* _default;
- const char* _min;
- const char* _max;
- };
-
struct AliasPair{
const char * name;
const char * alias;
@@ -110,8 +81,8 @@
bool isSection(const char*) const;
const char* getDescription(const Properties * sec, const char* fname) const;
- Type getType(const Properties * section, const char* fname) const;
- Status getStatus(const Properties* section, const char* fname) const;
+ ParameterType getType(const Properties * section, const char* fname) const;
+ ParameterStatus getStatus(const Properties* section, const char* fname) const;
Uint64 getMin(const Properties * section, const char* fname) const;
Uint64 getMax(const Properties * section, const char* fname) const;
Uint64 getDefault(const Properties * section, const char* fname) const;
@@ -132,7 +103,7 @@
static const int m_noOfSectionNames;
public:
- static const ParamInfo m_ParamInfo[];
+ static const ParamInfo* m_ParamInfo;
static const int m_NoOfParams;
static const SectionRule m_SectionRules[];
--- 1.26/ndb/src/mgmsrv/InitConfigFileParser.cpp 2006-09-08 16:46:19 +08:00
+++ 1.27/ndb/src/mgmsrv/InitConfigFileParser.cpp 2006-09-08 16:46:19 +08:00
@@ -22,6 +22,7 @@
#include <NdbOut.hpp>
#include "ConfigInfo.hpp"
#include <m_string.h>
+#include <mgmapi_config_parameters.h>
const int MAX_LINE_LENGTH = 1024; // Max length of line of text in config file
static void trim(char *);
@@ -271,11 +272,11 @@
ctx.reportError("[%s] Unknown parameter: %s", ctx.fname, fname);
return false;
}
- ConfigInfo::Status status = m_info->getStatus(ctx.m_currentInfo, fname);
- if (status == ConfigInfo::CI_NOTIMPLEMENTED) {
+ ParameterStatus status = m_info->getStatus(ctx.m_currentInfo, fname);
+ if (status == CI_NOTIMPLEMENTED) {
ctx.reportWarning("[%s] %s not yet implemented", ctx.fname, fname);
}
- if (status == ConfigInfo::CI_DEPRICATED) {
+ if (status == CI_DEPRICATED) {
const char * desc = m_info->getDescription(ctx.m_currentInfo, fname);
if(desc && desc[0]){
ctx.reportWarning("[%s] %s is depricated, use %s instead",
@@ -313,9 +314,9 @@
// Store name-value pair
// ***********************
- const ConfigInfo::Type type = m_info->getType(ctx.m_currentInfo, fname);
+ const ParameterType type = m_info->getType(ctx.m_currentInfo, fname);
switch(type){
- case ConfigInfo::CI_BOOL: {
+ case CI_BOOL: {
bool value_bool;
if (!convertStringToBool(value, value_bool)) {
ctx.reportError("Illegal boolean value for parameter %s", fname);
@@ -324,8 +325,8 @@
MGM_REQUIRE(ctx.m_currentSection->put(pname, value_bool));
break;
}
- case ConfigInfo::CI_INT:
- case ConfigInfo::CI_INT64:{
+ case CI_INT:
+ case CI_INT64:{
Uint64 value_int;
if (!convertStringToUint64(value, value_int)) {
ctx.reportError("Illegal integer value for parameter %s", fname);
@@ -338,17 +339,17 @@
m_info->getMax(ctx.m_currentInfo, fname));
return false;
}
- if(type == ConfigInfo::CI_INT){
+ if(type == CI_INT){
MGM_REQUIRE(ctx.m_currentSection->put(pname, (Uint32)value_int));
} else {
MGM_REQUIRE(ctx.m_currentSection->put64(pname, value_int));
}
break;
}
- case ConfigInfo::CI_STRING:
+ case CI_STRING:
MGM_REQUIRE(ctx.m_currentSection->put(pname, value));
break;
- case ConfigInfo::CI_SECTION:
+ case CI_SECTION:
abort();
}
return true;
@@ -765,21 +766,21 @@
{
struct my_option opt;
bzero(&opt, sizeof(opt));
- const ConfigInfo::ParamInfo& param = ConfigInfo::m_ParamInfo[i];
+ const ParamInfo& param = ConfigInfo::m_ParamInfo[i];
switch(param._type){
- case ConfigInfo::CI_BOOL:
+ case CI_BOOL:
opt.value = (gptr*)malloc(sizeof(int));
opt.var_type = GET_INT;
break;
- case ConfigInfo::CI_INT:
+ case CI_INT:
opt.value = (gptr*)malloc(sizeof(int));
opt.var_type = GET_INT;
break;
- case ConfigInfo::CI_INT64:
+ case CI_INT64:
opt.value = (gptr*)malloc(sizeof(Int64));
opt.var_type = GET_LL;
break;
- case ConfigInfo::CI_STRING:
+ case CI_STRING:
opt.value = (gptr*)malloc(sizeof(char *));
opt.var_type = GET_STR;
break;
--- 1.19/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2006-09-08 16:46:19 +08:00
+++ 1.20/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp 2006-09-08 16:46:19 +08:00
@@ -645,7 +645,7 @@
c_storedProcPool.setSize(noOfStoredProc);
c_buildIndexPool.setSize(c_noOfBuildIndexRec);
- c_triggerPool.setSize(noOfTriggers);
+ c_triggerPool.setSize(noOfTriggers, true, CFG_DB_NO_TRIGGERS);
c_scanOpPool.setSize(nScanOp);
czero = 0;
--- 1.15/ndb/src/kernel/error/ErrorReporter.cpp 2006-09-08 16:46:19 +08:00
+++ 1.16/ndb/src/kernel/error/ErrorReporter.cpp 2006-09-08 16:46:19 +08:00
@@ -27,6 +27,7 @@
#include <Configuration.hpp>
#include <NdbAutoPtr.hpp>
+#include <mgmapi.h>
#define MESSAGE_LENGTH 500
@@ -105,6 +106,14 @@
return traceFileNo;
}
+char ErrorReporter::errorParameterName[] = NULL_PARAMETER_NAME;
+
+void
+ErrorReporter::setErrorParameterName(const int paramId)
+{
+ BaseString::snprintf(errorParameterName, LENGTH_PARAMETER_NAME, "%s",
NULL_PARAMETER_NAME);
+ ndb_mgm_get_db_parameter_name(paramId, errorParameterName);
+}
void
ErrorReporter::formatMessage(int faultID,
@@ -124,7 +133,7 @@
BaseString::snprintf(messptr, MESSAGE_LENGTH,
"Time: %s\n"
"Status: %s\n"
- "Message: %s (%s)\n"
+ "Message: %s %s (%s)\n"
"Error: %d\n"
"Error data: %s\n"
"Error object: %s\n"
@@ -135,7 +144,7 @@
"***EOM***\n",
formatTimeStampString() ,
exit_st_msg,
- exit_msg, exit_cl_msg,
+ exit_msg, errorParameterName, exit_cl_msg,
faultID,
(problemData == NULL) ? "" : problemData,
objRef,
--- 1.9/ndb/src/kernel/error/ErrorReporter.hpp 2006-09-08 16:46:19 +08:00
+++ 1.10/ndb/src/kernel/error/ErrorReporter.hpp 2006-09-08 16:46:19 +08:00
@@ -26,6 +26,7 @@
class ErrorReporter
{
public:
+ static void setErrorParameterName(const int paramId = NULL_PARAMETER_ID);
static void setErrorHandlerShutdownType(NdbShutdownType nst = NST_ErrorHandler);
static void handleAssert(const char* message,
const char* file,
@@ -52,6 +53,7 @@
private:
static enum NdbShutdownType s_errorHandlerShutdownType;
+ static char errorParameterName[LENGTH_PARAMETER_NAME];
};
#endif
--- 1.8/ndb/src/kernel/vm/ArrayPool.hpp 2006-09-08 16:46:20 +08:00
+++ 1.9/ndb/src/kernel/vm/ArrayPool.hpp 2006-09-08 16:46:20 +08:00
@@ -45,7 +45,7 @@
*
* Note, can currently only be called once
*/
- bool setSize(Uint32 noOfElements, bool exit_on_error = true);
+ bool setSize(Uint32 noOfElements, bool exit_on_error = true, const int paramId =
NULL_PARAMETER_ID);
inline Uint32 getNoOfFree() const {
return noOfFree;
@@ -219,15 +219,21 @@
template <class T>
inline
bool
-ArrayPool<T>::setSize(Uint32 noOfElements, bool exit_on_error){
+ArrayPool<T>::setSize(Uint32 noOfElements, bool exit_on_error, const int paramId){
if(size == 0){
if(noOfElements == 0)
return true;
- theArray = (T *)ndbd_malloc(noOfElements * sizeof(T));
+
+ Uint64 real_size = noOfElements * sizeof(T);
+ Uint32 req_size = (Uint32)real_size;
+
+ if((Uint64)req_size == real_size && real_size > 0)
+ theArray = (T *)ndbd_malloc(req_size);
if(theArray == 0)
{
if (!exit_on_error)
return false;
+ ErrorReporter::setErrorParameterName(paramId);
ErrorReporter::handleAssert("ArrayPool<T>::setSize malloc failed",
__FILE__, __LINE__, NDBD_EXIT_MEMALLOC);
return false; // not reached
| Thread |
|---|
| • bk commit into 5.0 tree (Justin.He:1.2255) BUG#19454 | jhe | 8 Sep |