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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
03511a0d
Commit
03511a0d
authored
Aug 25, 2004
by
mronstrom@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/Users/mikron/mysql-4.1-ndb
parents
67743779
253bab73
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
17 deletions
+50
-17
ndb/src/common/mgmcommon/ConfigInfo.cpp
ndb/src/common/mgmcommon/ConfigInfo.cpp
+34
-14
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+1
-1
ndb/src/kernel/vm/Configuration.cpp
ndb/src/kernel/vm/Configuration.cpp
+1
-1
ndb/src/mgmsrv/Makefile.am
ndb/src/mgmsrv/Makefile.am
+0
-1
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+14
-0
No files found.
ndb/src/common/mgmcommon/ConfigInfo.cpp
View file @
03511a0d
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <NdbTCP.h>
#include <NdbTCP.h>
#include "ConfigInfo.hpp"
#include "ConfigInfo.hpp"
#include <mgmapi_config_parameters.h>
#include <mgmapi_config_parameters.h>
...
@@ -2369,12 +2371,40 @@ transformNode(InitConfigFileParser::Context & ctx, const char * data){
...
@@ -2369,12 +2371,40 @@ transformNode(InitConfigFileParser::Context & ctx, const char * data){
return
true
;
return
true
;
}
}
static
bool
checkLocalhostHostnameMix
(
InitConfigFileParser
::
Context
&
ctx
)
{
DBUG_ENTER
(
"checkLocalhostHostnameMix"
);
const
char
*
hostname
=
0
;
ctx
.
m_currentSection
->
get
(
"HostName"
,
&
hostname
);
if
(
hostname
==
0
||
hostname
[
0
]
==
0
)
DBUG_RETURN
(
true
);
Uint32
localhost_used
=
0
;
if
(
!
strcmp
(
hostname
,
"localhost"
)
||
!
strcmp
(
hostname
,
"127.0.0.1"
)){
localhost_used
=
1
;
ctx
.
m_userProperties
.
put
(
"$computer-localhost-used"
,
localhost_used
);
if
(
!
ctx
.
m_userProperties
.
get
(
"$computer-localhost"
,
&
hostname
))
DBUG_RETURN
(
true
);
}
else
{
ctx
.
m_userProperties
.
get
(
"$computer-localhost-used"
,
&
localhost_used
);
ctx
.
m_userProperties
.
put
(
"$computer-localhost"
,
hostname
);
}
if
(
localhost_used
)
{
ctx
.
reportError
(
"Mixing of localhost with other hostname(%s) is illegal"
,
hostname
);
DBUG_RETURN
(
false
);
}
DBUG_RETURN
(
true
);
}
bool
bool
fixNodeHostname
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
){
fixNodeHostname
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
){
const
char
*
hostname
;
const
char
*
hostname
;
if
(
ctx
.
m_currentSection
->
get
(
"HostName"
,
&
hostname
))
if
(
ctx
.
m_currentSection
->
get
(
"HostName"
,
&
hostname
))
return
true
;
return
checkLocalhostHostnameMix
(
ctx
)
;
const
char
*
compId
;
const
char
*
compId
;
if
(
!
ctx
.
m_currentSection
->
get
(
"ExecuteOnComputer"
,
&
compId
)){
if
(
!
ctx
.
m_currentSection
->
get
(
"ExecuteOnComputer"
,
&
compId
)){
...
@@ -2383,7 +2413,7 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
...
@@ -2383,7 +2413,7 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
require
(
ctx
.
m_currentSection
->
put
(
"HostName"
,
"localhost"
));
require
(
ctx
.
m_currentSection
->
put
(
"HostName"
,
"localhost"
));
else
else
require
(
ctx
.
m_currentSection
->
put
(
"HostName"
,
""
));
require
(
ctx
.
m_currentSection
->
put
(
"HostName"
,
""
));
return
true
;
return
checkLocalhostHostnameMix
(
ctx
)
;
}
}
const
Properties
*
computer
;
const
Properties
*
computer
;
...
@@ -2404,7 +2434,7 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
...
@@ -2404,7 +2434,7 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
}
}
require
(
ctx
.
m_currentSection
->
put
(
"HostName"
,
hostname
));
require
(
ctx
.
m_currentSection
->
put
(
"HostName"
,
hostname
));
return
true
;
return
checkLocalhostHostnameMix
(
ctx
)
;
}
}
bool
bool
...
@@ -2516,17 +2546,7 @@ transformComputer(InitConfigFileParser::Context & ctx, const char * data){
...
@@ -2516,17 +2546,7 @@ transformComputer(InitConfigFileParser::Context & ctx, const char * data){
return
true
;
return
true
;
}
}
if
(
!
strcmp
(
hostname
,
"localhost"
)
||
!
strcmp
(
hostname
,
"127.0.0.1"
)){
return
checkLocalhostHostnameMix
(
ctx
);
if
(
ctx
.
m_userProperties
.
get
(
"$computer-localhost"
,
&
hostname
)){
ctx
.
reportError
(
"Mixing of localhost with other hostname(%s) is illegal"
,
hostname
);
return
false
;
}
}
else
{
ctx
.
m_userProperties
.
put
(
"$computer-localhost"
,
hostname
);
}
return
true
;
}
}
/**
/**
...
...
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
View file @
03511a0d
...
@@ -12562,7 +12562,7 @@ void Dbacc::releaseLcpConnectRec(Signal* signal)
...
@@ -12562,7 +12562,7 @@ void Dbacc::releaseLcpConnectRec(Signal* signal)
/* --------------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------------- */
void
Dbacc
::
releaseOpRec
(
Signal
*
signal
)
void
Dbacc
::
releaseOpRec
(
Signal
*
signal
)
{
{
#if
def VM_TRACE
#if
0
// DEBUG CODE
// DEBUG CODE
// Check that the operation to be released isn't
// Check that the operation to be released isn't
// already in the list of free operations
// already in the list of free operations
...
...
ndb/src/kernel/vm/Configuration.cpp
View file @
03511a0d
...
@@ -403,7 +403,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -403,7 +403,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
unsigned
int
noBatchSize
=
0
;
unsigned
int
noBatchSize
=
0
;
m_logLevel
=
new
LogLevel
();
m_logLevel
=
new
LogLevel
();
struct
AttribStorage
{
int
paramId
;
Uint32
*
storage
;
bool
computable
};
struct
AttribStorage
{
int
paramId
;
Uint32
*
storage
;
bool
computable
;
};
AttribStorage
tmp
[]
=
{
AttribStorage
tmp
[]
=
{
{
CFG_DB_NO_SCANS
,
&
noOfScanRecords
,
false
},
{
CFG_DB_NO_SCANS
,
&
noOfScanRecords
,
false
},
{
CFG_DB_NO_LOCAL_SCANS
,
&
noOfLocalScanRecords
,
true
},
{
CFG_DB_NO_LOCAL_SCANS
,
&
noOfLocalScanRecords
,
true
},
...
...
ndb/src/mgmsrv/Makefile.am
View file @
03511a0d
...
@@ -19,7 +19,6 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \
...
@@ -19,7 +19,6 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \
LDADD_LOC
=
$(top_builddir)
/ndb/src/libndbclient.la
\
LDADD_LOC
=
$(top_builddir)
/ndb/src/libndbclient.la
\
$(top_builddir)
/ndb/src/common/editline/libeditline.a
\
$(top_builddir)
/ndb/src/common/editline/libeditline.a
\
$(top_builddir)
/ndb/src/libndbclient.la
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/dbug/libdbug.a
\
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/mysys/libmysys.a
\
$(top_builddir)
/strings/libmystrings.a
$(top_builddir)
/strings/libmystrings.a
...
...
ndb/src/mgmsrv/main.cpp
View file @
03511a0d
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <ndb_global.h>
#include <my_sys.h>
#include "MgmtSrvr.hpp"
#include "MgmtSrvr.hpp"
#include "EventLogger.hpp"
#include "EventLogger.hpp"
...
@@ -97,12 +98,19 @@ extern EventLogger g_EventLogger;
...
@@ -97,12 +98,19 @@ extern EventLogger g_EventLogger;
extern
int
global_mgmt_server_check
;
extern
int
global_mgmt_server_check
;
int
_print_version
=
0
;
int
_print_version
=
0
;
#ifndef DBUG_OFF
const
char
*
debug_option
=
0
;
#endif
struct
getargs
args
[]
=
{
struct
getargs
args
[]
=
{
{
"version"
,
'v'
,
arg_flag
,
&
_print_version
,
{
"version"
,
'v'
,
arg_flag
,
&
_print_version
,
"Print ndb_mgmd version"
},
"Print ndb_mgmd version"
},
{
"config-file"
,
'c'
,
arg_string
,
&
glob
.
config_filename
,
{
"config-file"
,
'c'
,
arg_string
,
&
glob
.
config_filename
,
"Specify cluster configuration file"
,
"filename"
},
"Specify cluster configuration file"
,
"filename"
},
#ifndef DBUG_OFF
{
"debug"
,
0
,
arg_string
,
&
debug_option
,
"Specify debug option e.d. d:t:i:o,out.trace"
,
"options"
},
#endif
{
"daemon"
,
'd'
,
arg_flag
,
&
glob
.
daemon
,
{
"daemon"
,
'd'
,
arg_flag
,
&
glob
.
daemon
,
"Run ndb_mgmd in daemon mode"
},
"Run ndb_mgmd in daemon mode"
},
{
NULL
,
'l'
,
arg_string
,
&
glob
.
local_config_filename
,
{
NULL
,
'l'
,
arg_string
,
&
glob
.
local_config_filename
,
...
@@ -135,6 +143,12 @@ NDB_MAIN(mgmsrv){
...
@@ -135,6 +143,12 @@ NDB_MAIN(mgmsrv){
exit
(
1
);
exit
(
1
);
}
}
my_init
();
#ifndef DBUG_OFF
if
(
debug_option
)
DBUG_PUSH
(
debug_option
);
#endif
if
(
_print_version
)
{
if
(
_print_version
)
{
ndbPrintVersion
();
ndbPrintVersion
();
exit
(
0
);
exit
(
0
);
...
...
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