Skip to content

Commit 2446c67

Browse files
committed
Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
Change-Id: Ib8fb76fb0b44f6c1985dae7c7b6cdc21e35749ff
2 parents 055944b + 9e37766 commit 2446c67

File tree

5 files changed

+27
-10
lines changed

5 files changed

+27
-10
lines changed

mysql-test/suite/ndb/r/ndb_tools_connect.result

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ Unable to connect to management server.
7676
- Error: '1011: Could not connect to socket: Unable to connect with connect string: nodeid=0,no_such_host:1186'
7777

7878
Testing ndb_waiter
79-
Connecting to mgmsrv at no_such_host
79+
Connecting to management server at nodeid=0,localhost:<MGMD-PORT>
80+
Node 1: STARTED
81+
Node 2: STARTED
82+
Connecting to management server at nodeid=0,no_such_host:1186
8083
Unable to connect with connect string: nodeid=0,no_such_host:1186
8184
Retrying every 1 seconds. Attempts left: 2 1, failed.
8285
latest_error=1011, line=no_such_host

mysql-test/suite/ndb/t/ndb_tools_connect.test

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ drop table t1;
6363
--exec $NDB_SHOW_TABLES --ndb-connectstring=no_such_host --connect-retry-delay=1 --connect-retries=3
6464
--echo
6565
--echo Testing ndb_waiter
66+
--replace_regex /localhost:[0-9]*/localhost:<MGMD-PORT>/
67+
--exec $NDB_WAITER
6668
--replace_regex /line.*/line=no_such_host/
6769
--error 1
6870
--exec $NDB_WAITER --ndb-connectstring=no_such_host --connect-retry-delay=1 --connect-retries=3

storage/ndb/test/src/NdbRestarter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2003, 2023, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -611,7 +611,7 @@ NdbRestarter::connect(){
611611
g_err << "handle == NULL" << endl;
612612
return -1;
613613
}
614-
g_info << "Connecting to mgmsrv at " << addr.c_str() << endl;
614+
g_info << "Connecting to management server at " << addr.c_str() << endl;
615615
if (ndb_mgm_set_connectstring(handle,addr.c_str()))
616616
{
617617
MGMERR(handle);

storage/ndb/test/tools/restart.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2003, 2023, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -51,8 +51,8 @@ int main(int argc, const char** argv){
5151
int num_args = sizeof(args) / sizeof(args[0]);
5252
int optind = 0;
5353
char desc[] =
54-
"hostname:port\n"\
55-
"This program will connect to the mgmsrv of a NDB cluster\n"\
54+
"hostname:port\n"
55+
"This program will connect to the management server of an NDB cluster\n"
5656
" and restart the cluster. \n";
5757

5858
if(getarg(args, num_args, argc, argv, &optind) || _help) {

storage/ndb/tools/waiter.cpp

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2004, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2004, 2023, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -298,16 +298,28 @@ waitClusterStatus(const char* _addr,
298298
ndberr << "Could not create ndb_mgm handle" << endl;
299299
return -1;
300300
}
301-
ndbout << "Connecting to mgmsrv at " << _addr << endl;
301+
302302
if (ndb_mgm_set_connectstring(handle, _addr))
303303
{
304304
MGMERR(handle);
305-
ndberr << "Connectstring " << _addr << " invalid" << endl;
305+
if (_addr != NULL)
306+
{
307+
ndberr << "Connectstring " << _addr << " is invalid" << endl;
308+
}
309+
else
310+
{
311+
ndberr << "Connectstring is invalid" << endl;
312+
}
306313
return -1;
307314
}
315+
char buf[1024];
316+
ndbout << "Connecting to management server at "
317+
<< ndb_mgm_get_connectstring(handle, buf, sizeof(buf)) << endl;
308318
if (ndb_mgm_connect(handle, opt_connect_retries - 1, opt_connect_retry_delay, 1)) {
309319
MGMERR(handle);
310-
ndberr << "Connection to " << _addr << " failed" << endl;
320+
ndberr << "Connection to "
321+
<< ndb_mgm_get_connectstring(handle, buf, sizeof(buf)) << " failed"
322+
<< endl;
311323
return -1;
312324
}
313325

0 commit comments

Comments
 (0)