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
86989ceb
Commit
86989ceb
authored
Jan 07, 2005
by
stewart@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Along the road to a working Impl3 of WL2278.
parent
744cd242
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
11 deletions
+36
-11
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+8
-5
ndb/src/mgmapi/mgmapi.cpp
ndb/src/mgmapi/mgmapi.cpp
+4
-4
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+6
-0
ndb/src/mgmsrv/MgmtSrvr.hpp
ndb/src/mgmsrv/MgmtSrvr.hpp
+3
-1
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+15
-1
No files found.
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
86989ceb
...
...
@@ -1189,12 +1189,14 @@ TransporterRegistry::start_clients_thread()
const
NodeId
nodeId
=
t
->
getRemoteNodeId
();
switch
(
performStates
[
nodeId
]){
case
CONNECTING
:
if
(
!
t
->
isConnected
()
&&
!
t
->
isServer
)
{
if
(
!
t
->
isConnected
()
&&
!
t
->
isServer
&&
theTransporterTypes
[
nodeId
]
==
tt_TCP_TRANSPORTER
)
{
if
(
t
->
get_r_port
()
<=
0
)
{
// Port is dynamic
Uint32
server_port
=
0
;
Uint32
server_port
=
0
;
struct
ndb_mgm_reply
mgm_reply
;
int
res
;
res
=
ndb_mgm_get_connection_int_parameter
(
m_mgm_handle
,
res
=
ndb_mgm_get_connection_int_parameter
(
m_mgm_handle
,
t
->
getRemoteNodeId
(),
t
->
getLocalNodeId
(),
CFG_CONNECTION_SERVER_PORT
,
...
...
@@ -1206,9 +1208,10 @@ TransporterRegistry::start_clients_thread()
if
(
res
>=
0
)
t
->
set_r_port
(
server_port
);
else
ndbout_c
(
"Failed to get dynamic port to connect to
."
);
ndbout_c
(
"Failed to get dynamic port to connect to
: %d"
,
res
);
}
if
(
t
->
get_r_port
()
>
0
)
if
(
theTransporterTypes
[
nodeId
]
!=
tt_TCP_TRANSPORTER
||
t
->
get_r_port
()
>
0
)
t
->
connect_client
();
else
NdbSleep_MilliSleep
(
400
);
...
...
ndb/src/mgmapi/mgmapi.cpp
View file @
86989ceb
...
...
@@ -2084,7 +2084,7 @@ ndb_mgm_set_connection_int_parameter(NdbMgmHandle handle,
}
while
(
0
);
delete
prop
;
return
res
;
DBUG_RETURN
(
res
)
;
}
extern
"C"
...
...
@@ -2097,7 +2097,7 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle,
struct
ndb_mgm_reply
*
mgmreply
){
DBUG_ENTER
(
"ndb_mgm_get_connection_int_parameter"
);
CHECK_HANDLE
(
handle
,
-
1
);
CHECK_CONNECTED
(
handle
,
-
1
);
CHECK_CONNECTED
(
handle
,
-
2
);
Properties
args
;
args
.
put
(
"node1"
,
node1
);
...
...
@@ -2113,7 +2113,7 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle,
const
Properties
*
prop
;
prop
=
ndb_mgm_call
(
handle
,
reply
,
"get connection parameter"
,
&
args
);
CHECK_REPLY
(
prop
,
-
2
);
CHECK_REPLY
(
prop
,
-
3
);
int
res
=
-
1
;
do
{
...
...
@@ -2127,7 +2127,7 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle,
if
(
!
prop
->
get
(
"value"
,
value
)){
ndbout_c
(
"Unable to get value"
);
res
=
-
3
;
res
=
-
4
;
}
delete
prop
;
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
86989ceb
...
...
@@ -2883,6 +2883,12 @@ MgmtSrvr::getConnectionDbParameter(int node1,
DBUG_RETURN
(
1
);
}
int
MgmtSrvr
::
set_connect_string
(
const
char
*
str
)
{
return
ndb_mgm_set_connectstring
(
m_config_retriever
->
get_mgmHandle
(),
str
);
}
template
class
Vector
<
SigMatch
>;
#if __SUNPRO_CC != 0x560
template
bool
SignalQueue
::
waitFor
<
SigMatch
>(
Vector
<
SigMatch
>&
,
SigMatch
**
,
NdbApiSignal
**
,
unsigned
);
...
...
ndb/src/mgmsrv/MgmtSrvr.hpp
View file @
86989ceb
...
...
@@ -512,7 +512,9 @@ public:
int
getConnectionDbParameter
(
int
node1
,
int
node2
,
int
param
,
unsigned
*
value
,
BaseString
&
msg
);
int
set_connect_string
(
const
char
*
str
);
ConfigRetriever
*
get_config_retriever
()
{
return
m_config_retriever
;
};
const
char
*
get_connect_address
(
Uint32
node_id
)
{
return
inet_ntoa
(
m_connect_address
[
node_id
]);
}
void
get_connected_nodes
(
NodeBitmask
&
connected_nodes
)
const
;
...
...
ndb/src/mgmsrv/main.cpp
View file @
86989ceb
...
...
@@ -246,12 +246,26 @@ int main(int argc, char** argv)
goto
error_end
;
}
char
connect_str
[
20
];
if
(
!
opt_connect_str
)
{
snprintf
(
connect_str
,
20
,
"localhost:%u"
,
glob
.
mgmObject
->
getPort
());
opt_connect_str
=
connect_str
;
}
glob
.
mgmObject
->
set_connect_string
(
connect_str
);
if
(
!
glob
.
mgmObject
->
check_start
()){
ndbout_c
(
"Unable to check start management server."
);
ndbout_c
(
"Probably caused by illegal initial configuration file."
);
goto
error_end
;
}
/*
* Connect back to ourselves so we can use mgmapi to fetch
* config info
*/
DBUG_PRINT
(
"info"
,(
"CONNECT RESULT: %d"
,
glob
.
mgmObject
->
get_config_retriever
()
->
do_connect
(
0
,
0
,
0
)));
if
(
glob
.
daemon
)
{
// Become a daemon
char
*
lockfile
=
NdbConfig_PidFileName
(
glob
.
localNodeId
);
...
...
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