~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/mtr_process.pl

  • Committer: Jay Pipes
  • Date: 2009-02-21 16:00:06 UTC
  • mto: (907.1.1 trunk-with-temporal)
  • mto: This revision was merged to the branch mainline in revision 908.
  • Revision ID: jpipes@serialcoder-20090221160006-vnk3wt4qbcz62eru
Removes the TIME column type and related time functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
sub mtr_wait_blocking ($);
32
32
sub mtr_record_dead_children ();
33
33
sub mtr_ndbmgm_start($$);
 
34
sub mtr_mysqladmin_start($$$);
34
35
sub mtr_exit ($);
35
36
sub sleep_until_file_created ($$$);
36
37
sub mtr_kill_processes ($);
359
360
              "socket: '$srv->{path_sock}'; ".
360
361
              "port: $srv->{port})");
361
362
 
362
 
    my $pid= mtr_server_shutdown($srv);
 
363
    my $pid= mtr_mysqladmin_start($srv, "shutdown", 20);
363
364
 
364
 
    # Save the pid of the drizzle client process
 
365
    # Save the pid of the mysqladmin process
365
366
    $admin_pids{$pid}= 1;
366
367
 
367
368
    push(@kill_pids,{
672
673
  }
673
674
}
674
675
 
675
 
sub mtr_server_shutdown($) {
 
676
# Start "mysqladmin <command>" for a specific mysqld
 
677
sub mtr_mysqladmin_start($$$) {
676
678
  my $srv= shift;
 
679
  my $command= shift;
 
680
  my $adm_shutdown_tmo= shift;
 
681
 
677
682
  my $args;
678
 
 
679
683
  mtr_init_args(\$args);
680
 
  mtr_add_arg($args, "--shutdown");
 
684
 
 
685
  mtr_add_arg($args, "--no-defaults");
681
686
  mtr_add_arg($args, "--user=%s", $::opt_user);
682
687
  mtr_add_arg($args, "--password=");
683
688
  mtr_add_arg($args, "--silent");
684
 
 
685
689
  if ( -e $srv->{'path_sock'} )
686
690
  {
687
691
    mtr_add_arg($args, "--socket=%s", $srv->{'path_sock'});
688
692
  }
689
 
 
690
693
  if ( $srv->{'port'} )
691
694
  {
692
695
    mtr_add_arg($args, "--port=%s", $srv->{'port'});
693
696
  }
694
 
 
695
697
  mtr_add_arg($args, "--connect_timeout=5");
696
698
 
697
 
  my $pid= mtr_spawn($::exe_drizzle, $args,
698
 
                     "", "", "", "", { append_log_file => 1 });
699
 
  mtr_verbose("mtr_server_shutdown, pid: $pid");
 
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,
 
703
                     "", "", "", "",
 
704
                     { append_log_file => 1 });
 
705
  mtr_verbose("mtr_mysqladmin_start, pid: $pid");
700
706
  return $pid;
 
707
 
701
708
}
702
709
 
703
710
# Start "ndb_mgm shutdown" for a specific cluster, it will