Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0de46f18
Commit
0de46f18
authored
Apr 13, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicate info in paramInfo and ConfigInfo
parent
592e0f22
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
2158 deletions
+27
-2158
storage/ndb/src/mgmapi/Makefile.am
storage/ndb/src/mgmapi/Makefile.am
+5
-2
storage/ndb/src/mgmapi/mgmapi_configuration.cpp
storage/ndb/src/mgmapi/mgmapi_configuration.cpp
+6
-8
storage/ndb/src/mgmsrv/ConfigInfo.cpp
storage/ndb/src/mgmsrv/ConfigInfo.cpp
+10
-1
storage/ndb/src/mgmsrv/ConfigInfo.hpp
storage/ndb/src/mgmsrv/ConfigInfo.hpp
+6
-0
storage/ndb/src/mgmsrv/ParamInfo.cpp
storage/ndb/src/mgmsrv/ParamInfo.cpp
+0
-2088
storage/ndb/src/mgmsrv/ParamInfo.hpp
storage/ndb/src/mgmsrv/ParamInfo.hpp
+0
-59
No files found.
storage/ndb/src/mgmapi/Makefile.am
View file @
0de46f18
...
...
@@ -13,13 +13,16 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MYSQLCLUSTERdir
=
.
noinst_LTLIBRARIES
=
libmgmapi.la
libmgmapi_la_SOURCES
=
mgmapi.cpp ndb_logevent.cpp mgmapi_configuration.cpp LocalConfig.cpp ../kernel/error/ndbd_exit_codes.c ../mgmsrv/
Param
Info.cpp
libmgmapi_la_SOURCES
=
mgmapi.cpp ndb_logevent.cpp mgmapi_configuration.cpp LocalConfig.cpp ../kernel/error/ndbd_exit_codes.c ../mgmsrv/
Config
Info.cpp
INCLUDES_LOC
=
-I
$(top_srcdir)
/storage/ndb/include/mgmapi
DEFS_LOC
=
-DNO_DEBUG_MESSAGES
-DNDB_PORT
=
"
\"
@ndb_port@
\"
"
DEFS_LOC
=
-DNDB_MGMAPI
-DMYSQLCLUSTERDIR
=
"
\"
$(MYSQLCLUSTERdir)
\"
"
\
-DNO_DEBUG_MESSAGES
-DNDB_PORT
=
"
\"
@ndb_port@
\"
"
include
$(top_srcdir)/storage/ndb/config/common.mk.am
include
$(top_srcdir)/storage/ndb/config/type_util.mk.am
...
...
storage/ndb/src/mgmapi/mgmapi_configuration.cpp
View file @
0de46f18
...
...
@@ -16,10 +16,7 @@
#include <ndb_types.h>
#include <mgmapi.h>
#include "mgmapi_configuration.hpp"
#include "../mgmsrv/ParamInfo.hpp"
extern
const
ParamInfo
ParamInfoArray
[];
extern
const
int
ParamInfoNum
;
#include "../mgmsrv/ConfigInfo.hpp"
ndb_mgm_configuration_iterator
::
ndb_mgm_configuration_iterator
(
const
ndb_mgm_configuration
&
conf
,
unsigned
type_of_section
)
...
...
@@ -187,18 +184,19 @@ ndb_mgm_get_db_parameter_info(Uint32 paramId, struct ndb_mgm_param_info * info,
return
-
1
;
}
for
(
int
i
=
0
;
i
<
ParamInfoNum
;
i
++
)
{
if
(
paramId
==
ParamInfoArray
[
i
].
_paramId
&&
strcmp
(
DB_TOKEN
,
ParamInfoArray
[
i
].
_section
)
==
0
)
{
ConfigInfo
data
;
for
(
int
i
=
0
;
i
<
data
.
m_NoOfParams
;
i
++
)
{
if
(
paramId
==
data
.
m_ParamInfo
[
i
].
_paramId
&&
strcmp
(
"DB"
,
data
.
m_ParamInfo
[
i
].
_section
)
==
0
)
{
size_t
tmp
=
0
;
if
(
tmp
+
sizeof
(
info
->
m_id
)
<=
*
size
)
{
info
->
m_id
=
ParamInfoArray
[
i
].
_paramId
;
info
->
m_id
=
data
.
m_ParamInfo
[
i
].
_paramId
;
tmp
+=
sizeof
(
info
->
m_id
);
}
if
(
tmp
+
sizeof
(
info
->
m_name
)
<=
*
size
)
{
info
->
m_name
=
ParamInfoArray
[
i
].
_fname
;
info
->
m_name
=
data
.
m_ParamInfo
[
i
].
_fname
;
tmp
+=
sizeof
(
info
->
m_name
);
}
...
...
storage/ndb/src/mgmsrv/ConfigInfo.cpp
View file @
0de46f18
...
...
@@ -14,6 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#ifndef NDB_MGMAPI
#include <ndb_opt_defaults.h>
#include <NdbTCP.h>
...
...
@@ -26,6 +27,11 @@
extern
my_bool
opt_ndb_shm
;
extern
my_bool
opt_core
;
#else
#include "ConfigInfo.hpp"
#include <mgmapi_config_parameters.h>
#endif
/* NDB_MGMAPI */
#define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0
#define MAX_INT_RNIL 0xfffffeff
...
...
@@ -46,6 +52,7 @@ extern my_bool opt_core;
#define MGM_TOKEN "MGM"
#define API_TOKEN "API"
#ifndef NDB_MGMAPI
const
ConfigInfo
::
AliasPair
ConfigInfo
::
m_sectionNameAliases
[]
=
{
{
API_TOKEN
,
"MYSQLD"
},
...
...
@@ -218,6 +225,7 @@ const DepricationTransform f_deprication[] = {
{
MGM_TOKEN
,
"Id"
,
"NodeId"
,
0
,
1
},
{
0
,
0
,
0
,
0
,
0
}
};
#endif
/* NDB_MGMAPI */
/**
* The default constructors create objects with suitable values for the
...
...
@@ -2154,7 +2162,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
const
int
ConfigInfo
::
m_NoOfParams
=
sizeof
(
m_ParamInfo
)
/
sizeof
(
ParamInfo
);
#ifndef NDB_MGMAPI
/****************************************************************************
* Ctor
****************************************************************************/
...
...
@@ -3742,3 +3750,4 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>§ions,
}
template
class
Vector
<
ConfigInfo
::
ConfigRuleSection
>;
#endif
/* NDB_MGMAPI */
storage/ndb/src/mgmsrv/ConfigInfo.hpp
View file @
0de46f18
...
...
@@ -16,11 +16,13 @@
#ifndef ConfigInfo_H
#define ConfigInfo_H
#ifndef NDB_MGMAPI
#include <kernel_types.h>
#include <Properties.hpp>
#include <ndb_limits.h>
#include <NdbOut.hpp>
#include "InitConfigFileParser.hpp"
#endif
/* NDB_MGMAPI */
/**
* A MANDATORY parameters must be specified in the config file
...
...
@@ -63,6 +65,7 @@ public:
const
char
*
_max
;
};
#ifndef NDB_MGMAPI
struct
AliasPair
{
const
char
*
name
;
const
char
*
alias
;
...
...
@@ -132,14 +135,17 @@ private:
static
const
AliasPair
m_sectionNameAliases
[];
static
const
char
*
m_sectionNames
[];
static
const
int
m_noOfSectionNames
;
#endif
/* NDB_MGMAPI */
public:
static
const
ParamInfo
m_ParamInfo
[];
static
const
int
m_NoOfParams
;
#ifndef NDB_MGMAPI
static
const
SectionRule
m_SectionRules
[];
static
const
ConfigRule
m_ConfigRules
[];
static
const
int
m_NoOfRules
;
#endif
/* NDB_MGMAPI */
};
#endif // ConfigInfo_H
storage/ndb/src/mgmsrv/ParamInfo.cpp
deleted
100644 → 0
View file @
592e0f22
This diff is collapsed.
Click to expand it.
storage/ndb/src/mgmsrv/ParamInfo.hpp
deleted
100644 → 0
View file @
592e0f22
/* Copyright (C) 2006 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; version 2 of the License.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef PARAMINFO_H
#define PARAMINFO_H
#define DB_TOKEN "DB"
#define MGM_TOKEN "MGM"
#define API_TOKEN "API"
#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
m_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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment