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
833f096d
Commit
833f096d
authored
Jan 10, 2005
by
stewart@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish WL2278 Impl 3 - Dynamic port allocation of cluster nodes.
parent
4048d89d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
ndb/include/util/SocketClient.hpp
ndb/include/util/SocketClient.hpp
+4
-0
ndb/src/common/transporter/Transporter.hpp
ndb/src/common/transporter/Transporter.hpp
+5
-1
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+2
-3
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+10
-1
No files found.
ndb/include/util/SocketClient.hpp
View file @
833f096d
...
...
@@ -31,6 +31,10 @@ public:
SocketClient
(
const
char
*
server_name
,
unsigned
short
port
,
SocketAuthenticator
*
sa
=
0
);
~
SocketClient
();
bool
init
();
void
set_port
(
unsigned
short
port
)
{
m_port
=
port
;
m_servaddr
.
sin_port
=
htons
(
m_port
);
};
NDB_SOCKET_TYPE
connect
();
bool
close
();
};
...
...
ndb/src/common/transporter/Transporter.hpp
View file @
833f096d
...
...
@@ -77,7 +77,11 @@ public:
/**
* Set r_port to connect to
*/
void
set_r_port
(
unsigned
int
port
)
{
m_r_port
=
port
;
};
void
set_r_port
(
unsigned
int
port
)
{
m_r_port
=
port
;
if
(
m_socket_client
)
m_socket_client
->
set_port
(
port
);
};
protected:
Transporter
(
TransporterRegistry
&
,
...
...
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
833f096d
...
...
@@ -1189,8 +1189,7 @@ TransporterRegistry::start_clients_thread()
const
NodeId
nodeId
=
t
->
getRemoteNodeId
();
switch
(
performStates
[
nodeId
]){
case
CONNECTING
:
if
(
!
t
->
isConnected
()
&&
!
t
->
isServer
&&
theTransporterTypes
[
nodeId
]
==
tt_TCP_TRANSPORTER
)
{
if
(
!
t
->
isConnected
()
&&
!
t
->
isServer
)
{
if
(
t
->
get_r_port
()
<=
0
)
{
// Port is dynamic
Uint32
server_port
=
0
;
struct
ndb_mgm_reply
mgm_reply
;
...
...
ndb/src/mgmsrv/main.cpp
View file @
833f096d
...
...
@@ -246,6 +246,7 @@ int main(int argc, char** argv)
goto
error_end
;
}
/* Construct a fake connectstring to connect back to ourselves */
char
connect_str
[
20
];
if
(
!
opt_connect_str
)
{
snprintf
(
connect_str
,
20
,
"localhost:%u"
,
glob
.
mgmObject
->
getPort
());
...
...
@@ -263,7 +264,15 @@ int main(int argc, char** argv)
* 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
)));
int
mgm_connect_result
;
mgm_connect_result
=
glob
.
mgmObject
->
get_config_retriever
()
->
do_connect
(
0
,
0
,
0
);
if
(
mgm_connect_result
<
0
)
{
ndbout_c
(
"Unable to connect to our own ndb_mgmd (Error %d)"
,
mgm_connect_result
);
ndbout_c
(
"This is probably a bug."
);
}
if
(
glob
.
daemon
)
{
...
...
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