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
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=
ndb_diskless
=
0
ndb_no_ord
=
512
ndb_con_op
=
10000
ndb_con_op
=
10
5
000
ndb_dmem
=
80M
ndb_imem
=
24M
...
...
ndb/include/mgmcommon/ConfigRetriever.hpp
View file @
b67853d7
...
...
@@ -73,6 +73,9 @@ public:
* Verify config
*/
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:
BaseString
errorString
;
enum
ErrorType
{
...
...
@@ -85,6 +88,8 @@ private:
struct
LocalConfig
&
_localConfig
;
Uint32
_ownNodeId
;
Uint32
m_mgmd_port
;
const
char
*
m_mgmd_host
;
Uint32
m_version
;
Uint32
m_node_type
;
...
...
ndb/src/common/mgmcommon/ConfigRetriever.cpp
View file @
b67853d7
...
...
@@ -74,6 +74,9 @@ ConfigRetriever::init() {
int
ConfigRetriever
::
do_connect
(
int
exit_on_connect_failure
){
m_mgmd_port
=
0
;
m_mgmd_host
=
0
;
if
(
!
m_handle
)
m_handle
=
ndb_mgm_create_handle
();
...
...
@@ -94,6 +97,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
case
MgmId_TCP
:
tmp
.
assfmt
(
"%s:%d"
,
m
->
name
.
c_str
(),
m
->
port
);
if
(
ndb_mgm_connect
(
m_handle
,
tmp
.
c_str
())
==
0
)
{
m_mgmd_port
=
m
->
port
;
m_mgmd_host
=
m
->
name
.
c_str
();
return
0
;
}
setError
(
CR_RETRY
,
ndb_mgm_get_latest_error_desc
(
m_handle
));
...
...
@@ -118,6 +123,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){
ndb_mgm_destroy_handle
(
&
m_handle
);
m_handle
=
0
;
m_mgmd_port
=
0
;
m_mgmd_host
=
0
;
return
-
1
;
}
...
...
ndb/src/kernel/main.cpp
View file @
b67853d7
...
...
@@ -252,6 +252,9 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
if
(
logLevel
.
getLogLevel
(
LogLevel
::
llStartUp
)
>
0
){
g_eventLogger
.
info
(
"NDB Cluster -- DB node %d"
,
globalData
.
ownId
);
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
g_eventLogger
.
info
(
"NDB is running on a machine with %d processor(s) at %d MHz"
,
processor
,
speed
);
...
...
ndb/src/kernel/vm/Configuration.cpp
View file @
b67853d7
...
...
@@ -193,6 +193,8 @@ Configuration::fetch_configuration(LocalConfig &local_config){
delete
m_config_retriever
;
}
m_mgmd_port
=
0
;
m_mgmd_host
=
0
;
m_config_retriever
=
new
ConfigRetriever
(
local_config
,
NDB_VERSION
,
NODE_TYPE_DB
);
if
(
m_config_retriever
->
init
()
==
-
1
||
m_config_retriever
->
do_connect
()
==
-
1
){
...
...
@@ -207,6 +209,9 @@ Configuration::fetch_configuration(LocalConfig &local_config){
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
;
if
((
globalData
.
ownId
=
cr
.
allocNodeId
())
==
0
){
...
...
ndb/src/kernel/vm/Configuration.hpp
View file @
b67853d7
...
...
@@ -67,6 +67,9 @@ public:
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
;
private:
friend
class
Cmvmi
;
...
...
@@ -95,6 +98,8 @@ private:
char
*
_backupPath
;
bool
_initialStart
;
char
*
_connectString
;
Uint32
m_mgmd_port
;
const
char
*
m_mgmd_host
;
bool
_daemonMode
;
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)
}
else
{
nodeId
=
0
;
}
//if
DBUG_RETURN
(
startTransactionLocal
(
aPriority
,
nodeId
));
{
NdbConnection
*
trans
=
startTransactionLocal
(
aPriority
,
nodeId
);
DBUG_PRINT
(
"exit"
,(
"start trans= 0x%x"
,
trans
));
DBUG_RETURN
(
trans
);
}
}
else
{
DBUG_RETURN
(
NULL
);
}
//if
...
...
@@ -451,7 +455,7 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
abort
();
}
#endif
DBUG_PRINT
(
"exit"
,
(
"trans
action id: %
d"
,
tConnection
->
getTransactionId
()));
DBUG_PRINT
(
"exit"
,
(
"trans
id= %ll
d"
,
tConnection
->
getTransactionId
()));
DBUG_RETURN
(
tConnection
);
}
//Ndb::startTransactionLocal()
...
...
@@ -465,6 +469,8 @@ void
Ndb
::
closeTransaction
(
NdbConnection
*
aConnection
)
{
DBUG_ENTER
(
"Ndb::closeTransaction"
);
DBUG_PRINT
(
"enter"
,(
"close trans= 0x%x, transid= %lld"
,
aConnection
,
aConnection
->
getTransactionId
()));
NdbConnection
*
tCon
;
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