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
e9843a85
Commit
e9843a85
authored
Jan 17, 2011
by
Magnus Blåudd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtr.pl fixes for ndb
- Support for graceful shutdown of cluster by using "ndb_mgm -e 'shutdown'"
parent
79173ada
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+34
-0
No files found.
mysql-test/mysql-test-run.pl
View file @
e9843a85
...
...
@@ -294,6 +294,7 @@ my $exe_ndbd;
my
$exe_ndbmtd
;
my
$exe_ndb_mgmd
;
my
$exe_ndb_waiter
;
my
$exe_ndb_mgm
;
our
$debug_compiled_binaries
;
...
...
@@ -1839,6 +1840,11 @@ sub executable_setup () {
["
storage/ndb/src/mgmsrv
",
"
libexec
",
"
sbin
",
"
bin
"],
"
ndb_mgmd
");
$exe_ndb_mgm
=
my_find_bin
(
$bindir
,
["
storage/ndb/src/mgmclient
",
"
bin
"],
"
ndb_mgm
");
$exe_ndb_waiter
=
my_find_bin
(
$bindir
,
["
storage/ndb/tools/
",
"
bin
"],
...
...
@@ -2644,6 +2650,27 @@ sub ndb_mgmd_wait_started($) {
return
1
;
}
sub
ndb_mgmd_stop
{
my
$ndb_mgmd
=
shift
or
die
"
usage: ndb_mgmd_stop(<ndb_mgmd>)
";
my
$host
=
$ndb_mgmd
->
value
('
HostName
');
my
$port
=
$ndb_mgmd
->
value
('
PortNumber
');
mtr_verbose
("
Stopping cluster '
$host
:
$port
'
");
my
$args
;
mtr_init_args
(
\
$args
);
mtr_add_arg
(
$args
,
"
--ndb-connectstring=%s:%s
",
$host
,
$port
);
mtr_add_arg
(
$args
,
"
-e
");
mtr_add_arg
(
$args
,
"
shutdown
");
My::
SafeProcess
->
run
(
name
=>
"
ndb_mgm shutdown
$host
:
$port
",
path
=>
$exe_ndb_mgm
,
args
=>
\
$args
,
output
=>
"
/dev/null
",
);
}
sub
ndb_mgmd_start
($$)
{
my
(
$cluster
,
$ndb_mgmd
)
=
@_
;
...
...
@@ -2671,6 +2698,7 @@ sub ndb_mgmd_start ($$) {
error
=>
$path_ndb_mgmd_log
,
append
=>
1
,
verbose
=>
$opt_verbose
,
shutdown
=>
sub
{
ndb_mgmd_stop
(
$ndb_mgmd
)
},
);
mtr_verbose
("
Started
$ndb_mgmd
->{proc}
");
...
...
@@ -2686,6 +2714,11 @@ sub ndb_mgmd_start ($$) {
return
0
;
}
sub
ndbd_stop
{
# Intentionally left empty, ndbd nodes will be shutdown
# by sending "shutdown" to ndb_mgmd
}
my
$exe_ndbmtd_counter
=
0
;
sub
ndbd_start
{
...
...
@@ -2721,6 +2754,7 @@ sub ndbd_start {
error
=>
$path_ndbd_log
,
append
=>
1
,
verbose
=>
$opt_verbose
,
shutdown
=>
sub
{
ndbd_stop
(
$ndbd
)
},
);
mtr_verbose
("
Started
$proc
");
...
...
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