31
31
sub mtr_wait_blocking ($);
32
32
sub mtr_record_dead_children ();
33
33
sub mtr_ndbmgm_start($$);
34
sub mtr_mysqladmin_start($$$);
36
35
sub sleep_until_file_created ($$$);
37
36
sub mtr_kill_processes ($);
360
359
"socket: '$srv->{path_sock}'; ".
361
360
"port: $srv->{port})");
363
my $pid= mtr_mysqladmin_start($srv, "shutdown", 20);
362
my $pid= mtr_server_shutdown($srv);
365
# Save the pid of the mysqladmin process
364
# Save the pid of the drizzle client process
366
365
$admin_pids{$pid}= 1;
368
367
push(@kill_pids,{
676
# Start "mysqladmin <command>" for a specific mysqld
677
sub mtr_mysqladmin_start($$$) {
675
sub mtr_server_shutdown($) {
680
my $adm_shutdown_tmo= shift;
683
679
mtr_init_args(\$args);
685
mtr_add_arg($args, "--no-defaults");
680
mtr_add_arg($args, "--shutdown");
686
681
mtr_add_arg($args, "--user=%s", $::opt_user);
687
682
mtr_add_arg($args, "--password=");
688
683
mtr_add_arg($args, "--silent");
689
685
if ( -e $srv->{'path_sock'} )
691
687
mtr_add_arg($args, "--socket=%s", $srv->{'path_sock'});
693
690
if ( $srv->{'port'} )
695
692
mtr_add_arg($args, "--port=%s", $srv->{'port'});
697
695
mtr_add_arg($args, "--connect_timeout=5");
699
# Shutdown time must be high as slave may be in reconnect
700
mtr_add_arg($args, "--shutdown_timeout=$adm_shutdown_tmo");
701
mtr_add_arg($args, "$command");
702
my $pid= mtr_spawn($::exe_drizzleadmin, $args,
704
{ append_log_file => 1 });
705
mtr_verbose("mtr_mysqladmin_start, pid: $pid");
697
my $pid= mtr_spawn($::exe_drizzle, $args,
698
"", "", "", "", { append_log_file => 1 });
699
mtr_verbose("mtr_server_shutdown, pid: $pid");
710
703
# Start "ndb_mgm shutdown" for a specific cluster, it will