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
b67853d7
Commit
b67853d7
authored
Sep 25, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added printout for where configuration is fetched
debug printouts
parent
8bfc619e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
4 deletions
+35
-4
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+1
-1
ndb/include/mgmcommon/ConfigRetriever.hpp
ndb/include/mgmcommon/ConfigRetriever.hpp
+6
-1
ndb/src/common/mgmcommon/ConfigRetriever.cpp
ndb/src/common/mgmcommon/ConfigRetriever.cpp
+7
-0
ndb/src/kernel/main.cpp
ndb/src/kernel/main.cpp
+3
-0
ndb/src/kernel/vm/Configuration.cpp
ndb/src/kernel/vm/Configuration.cpp
+5
-0
ndb/src/kernel/vm/Configuration.hpp
ndb/src/kernel/vm/Configuration.hpp
+5
-0
ndb/src/ndbapi/Ndb.cpp
ndb/src/ndbapi/Ndb.cpp
+8
-2
No files found.
mysql-test/ndb/ndbcluster.sh
View file @
b67853d7
...
@@ -45,7 +45,7 @@ status_ndb=
...
@@ -45,7 +45,7 @@ status_ndb=
ndb_diskless
=
0
ndb_diskless
=
0
ndb_no_ord
=
512
ndb_no_ord
=
512
ndb_con_op
=
10000
ndb_con_op
=
10
5
000
ndb_dmem
=
80M
ndb_dmem
=
80M
ndb_imem
=
24M
ndb_imem
=
24M
...
...
ndb/include/mgmcommon/ConfigRetriever.hpp
View file @
b67853d7
...
@@ -73,6 +73,9 @@ public:
...
@@ -73,6 +73,9 @@ public:
* Verify config
* Verify config
*/
*/
bool
verifyConfig
(
const
struct
ndb_mgm_configuration
*
,
Uint32
nodeid
);
bool
verifyConfig
(
const
struct
ndb_mgm_configuration
*
,
Uint32
nodeid
);
Uint32
get_mgmd_port
()
const
{
return
m_mgmd_port
;};
const
char
*
get_mgmd_host
()
const
{
return
m_mgmd_host
;};
private:
private:
BaseString
errorString
;
BaseString
errorString
;
enum
ErrorType
{
enum
ErrorType
{
...
@@ -85,6 +88,8 @@ private:
...
@@ -85,6 +88,8 @@ private:
struct
LocalConfig
&
_localConfig
;
struct
LocalConfig
&
_localConfig
;
Uint32
_ownNodeId
;
Uint32
_ownNodeId
;
Uint32
m_mgmd_port
;
const
char
*
m_mgmd_host
;
Uint32
m_version
;
Uint32
m_version
;
Uint32
m_node_type
;
Uint32
m_node_type
;
...
...
ndb/src/common/mgmcommon/ConfigRetriever.cpp
View file @
b67853d7
...
@@ -74,6 +74,9 @@ ConfigRetriever::init() {
...
@@ -74,6 +74,9 @@ ConfigRetriever::init() {
int
int
ConfigRetriever
::
do_connect
(
int
exit_on_connect_failure
){
ConfigRetriever
::
do_connect
(
int
exit_on_connect_failure
){
m_mgmd_port
=
0
;
m_mgmd_host
=
0
;
if
(
!
m_handle
)
if
(
!
m_handle
)
m_handle
=
ndb_mgm_create_handle
();
m_handle
=
ndb_mgm_create_handle
();
...
@@ -94,6 +97,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
...
@@ -94,6 +97,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
case
MgmId_TCP
:
case
MgmId_TCP
:
tmp
.
assfmt
(
"%s:%d"
,
m
->
name
.
c_str
(),
m
->
port
);
tmp
.
assfmt
(
"%s:%d"
,
m
->
name
.
c_str
(),
m
->
port
);
if
(
ndb_mgm_connect
(
m_handle
,
tmp
.
c_str
())
==
0
)
{
if
(
ndb_mgm_connect
(
m_handle
,
tmp
.
c_str
())
==
0
)
{
m_mgmd_port
=
m
->
port
;
m_mgmd_host
=
m
->
name
.
c_str
();
return
0
;
return
0
;
}
}
setError
(
CR_RETRY
,
ndb_mgm_get_latest_error_desc
(
m_handle
));
setError
(
CR_RETRY
,
ndb_mgm_get_latest_error_desc
(
m_handle
));
...
@@ -118,6 +123,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
...
@@ -118,6 +123,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
ndb_mgm_destroy_handle
(
&
m_handle
);
ndb_mgm_destroy_handle
(
&
m_handle
);
m_handle
=
0
;
m_handle
=
0
;
m_mgmd_port
=
0
;
m_mgmd_host
=
0
;
return
-
1
;
return
-
1
;
}
}
...
...
ndb/src/kernel/main.cpp
View file @
b67853d7
...
@@ -252,6 +252,9 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
...
@@ -252,6 +252,9 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
if
(
logLevel
.
getLogLevel
(
LogLevel
::
llStartUp
)
>
0
){
if
(
logLevel
.
getLogLevel
(
LogLevel
::
llStartUp
)
>
0
){
g_eventLogger
.
info
(
"NDB Cluster -- DB node %d"
,
globalData
.
ownId
);
g_eventLogger
.
info
(
"NDB Cluster -- DB node %d"
,
globalData
.
ownId
);
g_eventLogger
.
info
(
"%s --"
,
NDB_VERSION_STRING
);
g_eventLogger
.
info
(
"%s --"
,
NDB_VERSION_STRING
);
if
(
config
.
get_mgmd_host
())
g_eventLogger
.
info
(
"Configuration fetched at %s port %d"
,
config
.
get_mgmd_host
(),
config
.
get_mgmd_port
());
#ifdef NDB_SOLARIS // ok
#ifdef NDB_SOLARIS // ok
g_eventLogger
.
info
(
"NDB is running on a machine with %d processor(s) at %d MHz"
,
g_eventLogger
.
info
(
"NDB is running on a machine with %d processor(s) at %d MHz"
,
processor
,
speed
);
processor
,
speed
);
...
...
ndb/src/kernel/vm/Configuration.cpp
View file @
b67853d7
...
@@ -193,6 +193,8 @@ Configuration::fetch_configuration(LocalConfig &local_config){
...
@@ -193,6 +193,8 @@ Configuration::fetch_configuration(LocalConfig &local_config){
delete
m_config_retriever
;
delete
m_config_retriever
;
}
}
m_mgmd_port
=
0
;
m_mgmd_host
=
0
;
m_config_retriever
=
new
ConfigRetriever
(
local_config
,
NDB_VERSION
,
NODE_TYPE_DB
);
m_config_retriever
=
new
ConfigRetriever
(
local_config
,
NDB_VERSION
,
NODE_TYPE_DB
);
if
(
m_config_retriever
->
init
()
==
-
1
||
if
(
m_config_retriever
->
init
()
==
-
1
||
m_config_retriever
->
do_connect
()
==
-
1
){
m_config_retriever
->
do_connect
()
==
-
1
){
...
@@ -207,6 +209,9 @@ Configuration::fetch_configuration(LocalConfig &local_config){
...
@@ -207,6 +209,9 @@ Configuration::fetch_configuration(LocalConfig &local_config){
ERROR_SET
(
fatal
,
ERR_INVALID_CONFIG
,
"Could connect to ndb_mgmd"
,
s
);
ERROR_SET
(
fatal
,
ERR_INVALID_CONFIG
,
"Could connect to ndb_mgmd"
,
s
);
}
}
m_mgmd_port
=
m_config_retriever
->
get_mgmd_port
();
m_mgmd_host
=
m_config_retriever
->
get_mgmd_host
();
ConfigRetriever
&
cr
=
*
m_config_retriever
;
ConfigRetriever
&
cr
=
*
m_config_retriever
;
if
((
globalData
.
ownId
=
cr
.
allocNodeId
())
==
0
){
if
((
globalData
.
ownId
=
cr
.
allocNodeId
())
==
0
){
...
...
ndb/src/kernel/vm/Configuration.hpp
View file @
b67853d7
...
@@ -67,6 +67,9 @@ public:
...
@@ -67,6 +67,9 @@ public:
const
ndb_mgm_configuration_iterator
*
getOwnConfigIterator
()
const
;
const
ndb_mgm_configuration_iterator
*
getOwnConfigIterator
()
const
;
Uint32
get_mgmd_port
()
const
{
return
m_mgmd_port
;};
const
char
*
get_mgmd_host
()
const
{
return
m_mgmd_host
;};
class
LogLevel
*
m_logLevel
;
class
LogLevel
*
m_logLevel
;
private:
private:
friend
class
Cmvmi
;
friend
class
Cmvmi
;
...
@@ -95,6 +98,8 @@ private:
...
@@ -95,6 +98,8 @@ private:
char
*
_backupPath
;
char
*
_backupPath
;
bool
_initialStart
;
bool
_initialStart
;
char
*
_connectString
;
char
*
_connectString
;
Uint32
m_mgmd_port
;
const
char
*
m_mgmd_host
;
bool
_daemonMode
;
bool
_daemonMode
;
void
calcSizeAlt
(
class
ConfigValues
*
);
void
calcSizeAlt
(
class
ConfigValues
*
);
...
...
ndb/src/ndbapi/Ndb.cpp
View file @
b67853d7
...
@@ -327,7 +327,11 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
...
@@ -327,7 +327,11 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
}
else
{
}
else
{
nodeId
=
0
;
nodeId
=
0
;
}
//if
}
//if
DBUG_RETURN
(
startTransactionLocal
(
aPriority
,
nodeId
));
{
NdbConnection
*
trans
=
startTransactionLocal
(
aPriority
,
nodeId
);
DBUG_PRINT
(
"exit"
,(
"start trans= 0x%x"
,
trans
));
DBUG_RETURN
(
trans
);
}
}
else
{
}
else
{
DBUG_RETURN
(
NULL
);
DBUG_RETURN
(
NULL
);
}
//if
}
//if
...
@@ -451,7 +455,7 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
...
@@ -451,7 +455,7 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
abort
();
abort
();
}
}
#endif
#endif
DBUG_PRINT
(
"exit"
,
(
"trans
action id: %
d"
,
tConnection
->
getTransactionId
()));
DBUG_PRINT
(
"exit"
,
(
"trans
id= %ll
d"
,
tConnection
->
getTransactionId
()));
DBUG_RETURN
(
tConnection
);
DBUG_RETURN
(
tConnection
);
}
//Ndb::startTransactionLocal()
}
//Ndb::startTransactionLocal()
...
@@ -465,6 +469,8 @@ void
...
@@ -465,6 +469,8 @@ void
Ndb
::
closeTransaction
(
NdbConnection
*
aConnection
)
Ndb
::
closeTransaction
(
NdbConnection
*
aConnection
)
{
{
DBUG_ENTER
(
"Ndb::closeTransaction"
);
DBUG_ENTER
(
"Ndb::closeTransaction"
);
DBUG_PRINT
(
"enter"
,(
"close trans= 0x%x, transid= %lld"
,
aConnection
,
aConnection
->
getTransactionId
()));
NdbConnection
*
tCon
;
NdbConnection
*
tCon
;
NdbConnection
*
tPreviousCon
;
NdbConnection
*
tPreviousCon
;
...
...
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