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
c3f2f742
Commit
c3f2f742
authored
Aug 23, 2004
by
tomas@poseidon.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further simplifications of ndb config and aligned usage of mysql datadir in ndb
parent
efac4114
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
435 additions
and
401 deletions
+435
-401
acinclude.m4
acinclude.m4
+5
-0
configure.in
configure.in
+7
-2
mysql-test/ndb/ndb_config_2_node.ini
mysql-test/ndb/ndb_config_2_node.ini
+2
-10
ndb/include/ndb_global.h
ndb/include/ndb_global.h
+0
-1
ndb/src/common/mgmcommon/ConfigInfo.cpp
ndb/src/common/mgmcommon/ConfigInfo.cpp
+398
-369
ndb/src/common/mgmcommon/ConfigInfo.hpp
ndb/src/common/mgmcommon/ConfigInfo.hpp
+5
-5
ndb/src/common/mgmcommon/InitConfigFileParser.cpp
ndb/src/common/mgmcommon/InitConfigFileParser.cpp
+5
-11
ndb/src/common/mgmcommon/InitConfigFileParser.hpp
ndb/src/common/mgmcommon/InitConfigFileParser.hpp
+3
-2
ndb/src/common/mgmcommon/LocalConfig.cpp
ndb/src/common/mgmcommon/LocalConfig.cpp
+1
-1
ndb/src/common/mgmcommon/Makefile.am
ndb/src/common/mgmcommon/Makefile.am
+9
-0
No files found.
acinclude.m4
View file @
c3f2f742
...
...
@@ -1515,6 +1515,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
[ndb_docs="$withval"],
[ndb_docs=no])
AC_ARG_WITH([ndb-port-base],
[
--with-ndb-port-base Base port for NDB Cluster],
[ndb_port_base="$withval"],
[ndb_port_base="default"])
AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([])
...
...
configure.in
View file @
c3f2f742
...
...
@@ -389,8 +389,6 @@ then
# Disable exceptions as they seams to create problems with gcc and threads.
# mysqld doesn't use run-time-type-checking, so we disable it.
CXXFLAGS
=
"
$CXXFLAGS
-fno-implicit-templates -fno-exceptions -fno-rtti"
# ndb cannot be compiled with -fno-implicit-templaces
ndb_cxxflags_fix
=
"
$ndb_cxxflags_fix
-fimplicit-templates"
# If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux,
# we will gets some problems when linking static programs.
...
...
@@ -2985,6 +2983,13 @@ then
AC_SUBST
([
NDB_DEFS]
)
AC_SUBST
([
ndb_cxxflags_fix]
)
if
test
X
"
$ndb_port_base
"
=
Xdefault
then
ndb_port_base
=
"2200"
fi
AC_SUBST
([
ndb_port_base]
)
ndb_transporter_opt_objs
=
""
if
test
X
"
$have_ndb_shm
"
=
Xyes
then
...
...
mysql-test/ndb/ndb_config_2_node.ini
View file @
c3f2f742
...
...
@@ -7,19 +7,11 @@ Diskless: CHOOSE_Diskless
TimeBetweenWatchDogCheck:
30000
FileSystemPath:
CHOOSE_FILESYSTEM
[COMPUTER]
Id:
1
HostName:
CHOOSE_HOSTNAME_1
[COMPUTER]
Id:
2
HostName:
CHOOSE_HOSTNAME_2
[DB]
ExecuteOnComputer:
1
HostName:
CHOOSE_HOSTNAME_
1
[DB]
ExecuteOnComputer:
2
HostName:
CHOOSE_HOSTNAME_
2
[MGM]
PortNumber:
CHOOSE_PORT_MGM
...
...
ndb/include/ndb_global.h
View file @
c3f2f742
...
...
@@ -3,7 +3,6 @@
#define NDBGLOBAL_H
#include <my_global.h>
#define NDB_BASE_PORT 2200
/** signal & SIG_PIPE */
#include <my_alarm.h>
...
...
ndb/src/common/mgmcommon/ConfigInfo.cpp
View file @
c3f2f742
This diff is collapsed.
Click to expand it.
ndb/src/common/mgmcommon/ConfigInfo.hpp
View file @
c3f2f742
...
...
@@ -27,8 +27,8 @@
* 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
Uint64
MANDATORY
=
~
0
;
// Default value for mandatory params.
static
const
Uint64
UNDEFINED
=
(
~
0
)
-
1
;
// Default value for undefined params.
static
const
char
*
MANDATORY
=
(
char
*
)
~
(
UintPtr
)
0
;
// Default value for mandatory params.
static
const
char
*
UNDEFINED
=
0
;
// Default value for undefined params.
/**
* @class ConfigInfo
...
...
@@ -56,9 +56,9 @@ public:
Status
_status
;
bool
_updateable
;
Type
_type
;
Uint64
_default
;
Uint64
_min
;
Uint64
_max
;
const
char
*
_default
;
const
char
*
_min
;
const
char
*
_max
;
};
/**
...
...
ndb/src/common/mgmcommon/InitConfigFileParser.cpp
View file @
c3f2f742
...
...
@@ -31,7 +31,6 @@ static void require(bool v) { if(!v) abort();}
// Ctor / Dtor
//****************************************************************************
InitConfigFileParser
::
InitConfigFileParser
(){
m_info
=
new
ConfigInfo
();
}
...
...
@@ -111,7 +110,6 @@ InitConfigFileParser::parseConfig(FILE * file) {
"of configuration file."
);
return
0
;
}
snprintf
(
ctx
.
fname
,
sizeof
(
ctx
.
fname
),
section
);
free
(
section
);
ctx
.
type
=
InitConfigFileParser
::
DefaultSection
;
ctx
.
m_sectionLineno
=
ctx
.
m_lineno
;
...
...
@@ -132,7 +130,6 @@ InitConfigFileParser::parseConfig(FILE * file) {
"of configuration file."
);
return
0
;
}
snprintf
(
ctx
.
fname
,
sizeof
(
ctx
.
fname
),
section
);
free
(
section
);
ctx
.
type
=
InitConfigFileParser
::
Section
;
...
...
@@ -162,7 +159,6 @@ InitConfigFileParser::parseConfig(FILE * file) {
ctx
.
reportError
(
"Could not store section of configuration file."
);
return
0
;
}
for
(
size_t
i
=
0
;
ConfigInfo
::
m_ConfigRules
[
i
].
m_configRule
!=
0
;
i
++
){
ctx
.
type
=
InitConfigFileParser
::
Undefined
;
ctx
.
m_currentSection
=
0
;
...
...
@@ -378,7 +374,7 @@ bool InitConfigFileParser::convertStringToUint64(const char* s,
errno
=
0
;
char
*
p
;
long
long
v
=
strtoll
(
s
,
&
p
,
10
);
long
long
v
=
strtoll
(
s
,
&
p
,
log10base
);
if
(
errno
!=
0
)
return
false
;
...
...
@@ -536,20 +532,18 @@ InitConfigFileParser::storeSection(Context& ctx){
if
(
ctx
.
type
==
InitConfigFileParser
::
Section
){
for
(
int
i
=
0
;
i
<
m_info
->
m_NoOfRules
;
i
++
){
const
ConfigInfo
::
SectionRule
&
rule
=
m_info
->
m_SectionRules
[
i
];
if
(
!
strcmp
(
rule
.
m_section
,
"*"
)
||
!
strcmp
(
rule
.
m_section
,
ctx
.
fname
))
if
(
!
(
*
rule
.
m_sectionRule
)(
ctx
,
rule
.
m_ruleData
))
if
(
!
strcmp
(
rule
.
m_section
,
"*"
)
||
!
strcmp
(
rule
.
m_section
,
ctx
.
fname
))
{
if
(
!
(
*
rule
.
m_sectionRule
)(
ctx
,
rule
.
m_ruleData
))
{
return
false
;
}
}
}
}
if
(
ctx
.
type
==
InitConfigFileParser
::
DefaultSection
)
require
(
ctx
.
m_defaults
->
put
(
ctx
.
pname
,
ctx
.
m_currentSection
));
if
(
ctx
.
type
==
InitConfigFileParser
::
Section
)
require
(
ctx
.
m_config
->
put
(
ctx
.
pname
,
ctx
.
m_currentSection
));
delete
ctx
.
m_currentSection
;
ctx
.
m_currentSection
=
NULL
;
return
true
;
}
...
...
ndb/src/common/mgmcommon/InitConfigFileParser.hpp
View file @
c3f2f742
...
...
@@ -86,6 +86,9 @@ public:
void
reportWarning
(
const
char
*
msg
,
...);
};
static
bool
convertStringToUint64
(
const
char
*
s
,
Uint64
&
val
,
Uint32
log10base
=
0
);
static
bool
convertStringToBool
(
const
char
*
s
,
bool
&
val
);
private:
/**
* Check if line only contains space/comments
...
...
@@ -111,8 +114,6 @@ private:
bool
parseNameValuePair
(
Context
&
,
const
char
*
line
);
bool
storeNameValuePair
(
Context
&
,
const
char
*
fname
,
const
char
*
value
);
bool
convertStringToUint64
(
const
char
*
s
,
Uint64
&
val
,
Uint32
log10base
=
0
);
bool
convertStringToBool
(
const
char
*
s
,
bool
&
val
);
bool
storeSection
(
Context
&
);
const
Properties
*
getSection
(
const
char
*
name
,
const
Properties
*
src
);
...
...
ndb/src/common/mgmcommon/LocalConfig.cpp
View file @
c3f2f742
...
...
@@ -89,7 +89,7 @@ LocalConfig::init(const char *connectString,
//7. Check
{
char
buf
[
256
];
snprintf
(
buf
,
sizeof
(
buf
),
"host=localhost:%
u
"
,
NDB_BASE_PORT
);
snprintf
(
buf
,
sizeof
(
buf
),
"host=localhost:%
s
"
,
NDB_BASE_PORT
);
if
(
readConnectString
(
buf
))
return
true
;
}
...
...
ndb/src/common/mgmcommon/Makefile.am
View file @
c3f2f742
MYSQLDATAdir
=
$(localstatedir)
MYSQLSHAREdir
=
$(pkgdatadir)
MYSQLBASEdir
=
$(prefix)
noinst_LTLIBRARIES
=
libmgmsrvcommon.la
libmgmsrvcommon_la_SOURCES
=
\
...
...
@@ -10,6 +14,11 @@ libmgmsrvcommon_la_SOURCES = \
INCLUDES_LOC
=
-I
$(top_srcdir)
/ndb/src/mgmapi
DEFS_LOC
=
-DDEFAULT_MYSQL_HOME
=
"
\"
$(MYSQLBASEdir)
\"
"
\
-DDATADIR
=
"
\"
$(MYSQLDATAdir)
\"
"
\
-DSHAREDIR
=
"
\"
$(MYSQLSHAREdir)
\"
"
\
-DNDB_BASE_PORT
=
"
\"
@ndb_port_base@
\"
"
include
$(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/type_ndbapi.mk.am
include
$(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
...
...
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