summaryrefslogtreecommitdiff
path: root/mysql-test/lib/v1/mysql-test-run.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib/v1/mysql-test-run.pl')
-rwxr-xr-xmysql-test/lib/v1/mysql-test-run.pl1158
1 files changed, 2 insertions, 1156 deletions
diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl
index baeb141f18c..79489d92742 100755
--- a/mysql-test/lib/v1/mysql-test-run.pl
+++ b/mysql-test/lib/v1/mysql-test-run.pl
@@ -92,7 +92,6 @@ our $glob_cygwin_perl= ($^O eq "cygwin"); # Cygwin Perl
our $glob_win32= ($glob_win32_perl or $glob_cygwin_perl);
require "lib/v1/mtr_cases.pl";
-require "lib/v1/mtr_im.pl";
require "lib/v1/mtr_process.pl";
require "lib/v1/mtr_timer.pl";
require "lib/v1/mtr_io.pl";
@@ -168,8 +167,6 @@ our $exe_mysqlimport;
our $exe_mysqlshow;
our $file_mysql_fix_privilege_tables;
our $exe_mysqltest;
-our $exe_ndbd;
-our $exe_ndb_mgmd;
our $exe_slave_mysqld;
our $exe_my_print_defaults;
our $exe_perror;
@@ -233,19 +230,9 @@ our $opt_gprof_slave;
our $master;
our $slave;
-our $clusters;
-
-our $instance_manager;
our $opt_master_myport;
our $opt_slave_myport;
-our $im_port;
-our $im_mysqld1_port;
-our $im_mysqld2_port;
-our $opt_ndbcluster_port;
-our $opt_ndbconnectstring;
-our $opt_ndbcluster_port_slave;
-our $opt_ndbconnectstring_slave;
our $opt_record;
my $opt_report_features;
@@ -257,7 +244,6 @@ our $max_slave_num= 0;
our $max_master_num= 1;
our $use_innodb;
our $opt_skip_test;
-our $opt_skip_im;
our $opt_sleep;
@@ -296,22 +282,9 @@ our $opt_stress_test_file= "";
our $opt_warnings;
-our $opt_skip_ndbcluster= 0;
-our $opt_skip_ndbcluster_slave= 0;
-our $opt_with_ndbcluster= 0;
-our $opt_with_ndbcluster_only= 0;
-our $glob_ndbcluster_supported= 0;
-our $opt_ndb_extra_test= 0;
our $opt_skip_master_binlog= 0;
our $opt_skip_slave_binlog= 0;
-our $exe_ndb_mgm;
-our $exe_ndb_waiter;
-our $path_ndb_tools_dir;
-our $path_ndb_examples_dir;
-our $exe_ndb_example;
-our $path_ndb_testrun_log;
-
our $path_sql_dir;
our @data_dir_lst;
@@ -345,11 +318,6 @@ sub remove_stale_vardir ();
sub setup_vardir ();
sub check_ssl_support ($);
sub check_running_as_root();
-sub check_ndbcluster_support ($);
-sub rm_ndbcluster_tables ($);
-sub ndbcluster_start_install ($);
-sub ndbcluster_start ($$);
-sub ndbcluster_wait_started ($$);
sub mysqld_wait_started($);
sub run_benchmarks ($);
sub initialize_servers ();
@@ -363,8 +331,6 @@ sub run_testcase_check_skip_test($);
sub report_failure_and_restart ($);
sub do_before_start_master ($);
sub do_before_start_slave ($);
-sub ndbd_start ($$$);
-sub ndb_mgmd_start ($);
sub mysqld_start ($$$);
sub mysqld_arguments ($$$$);
sub stop_all_servers ();
@@ -384,7 +350,6 @@ sub main () {
command_line_setup();
- check_ndbcluster_support(\%mysqld_variables);
check_ssl_support(\%mysqld_variables);
check_debug_support(\%mysqld_variables);
@@ -419,42 +384,18 @@ sub main () {
if (!$opt_suites)
{
$opt_suites= $opt_suites_default;
-
- # Check for any extra suites to enable based on the path name
- my %extra_suites=
- (
- "mysql-5.1-new-ndb" => "ndb_team",
- "mysql-5.1-new-ndb-merge" => "ndb_team",
- "mysql-5.1-telco-6.2" => "ndb_team",
- "mysql-5.1-telco-6.2-merge" => "ndb_team",
- "mysql-5.1-telco-6.3" => "ndb_team",
- "mysql-6.0-ndb" => "ndb_team",
- );
-
- foreach my $dir ( reverse splitdir($glob_basedir) )
- {
- my $extra_suite= $extra_suites{$dir};
- if (defined $extra_suite){
- mtr_report("Found extra suite: $extra_suite");
- $opt_suites= "$extra_suite,$opt_suites";
- last;
- }
- }
}
my $tests= collect_test_cases($opt_suites);
- # Turn off NDB and other similar options if no tests use it
- my ($need_ndbcluster,$need_im, $need_debug);
+ my ($need_debug);
foreach my $test (@$tests)
{
next if $test->{skip};
if (!$opt_extern)
{
- $need_ndbcluster||= $test->{ndb_test};
$need_debug||=$test->{need_debug};
- $need_im||= $test->{component_id} eq 'im';
# Count max number of slaves used by a test case
if ( $test->{slave_num} > $max_slave_num) {
@@ -472,30 +413,11 @@ sub main () {
$use_innodb||= $test->{'innodb_test'};
}
- # Check if cluster can be skipped
- if ( !$need_ndbcluster )
- {
- $opt_skip_ndbcluster= 1;
- $opt_skip_ndbcluster_slave= 1;
- }
-
if ( !$need_debug && !$opt_debug)
{
$opt_debug=0;
}
- # Check if slave cluster can be skipped
- if ($max_slave_num == 0)
- {
- $opt_skip_ndbcluster_slave= 1;
- }
-
- # Check if im can be skipped
- if ( ! $need_im )
- {
- $opt_skip_im= 1;
- }
-
initialize_servers();
if ( $opt_report_features ) {
@@ -580,23 +502,16 @@ sub command_line_setup () {
'compress' => \$opt_compress,
'bench' => \$opt_bench,
'small-bench' => \$opt_small_bench,
- 'with-ndbcluster|ndb' => \$opt_with_ndbcluster,
'vs-config' => \$opt_vs_config,
# Control what test suites or cases to run
'force' => \$opt_force,
- 'with-ndbcluster-only' => \$opt_with_ndbcluster_only,
- 'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
- 'skip-ndbcluster-slave|skip-ndb-slave'
- => \$opt_skip_ndbcluster_slave,
- 'ndb-extra-test' => \$opt_ndb_extra_test,
'skip-master-binlog' => \$opt_skip_master_binlog,
'skip-slave-binlog' => \$opt_skip_slave_binlog,
'do-test=s' => \$opt_do_test,
'start-from=s' => \$opt_start_from,
'suite|suites=s' => \$opt_suites,
'skip-rpl' => \$opt_skip_rpl,
- 'skip-im' => \$opt_skip_im,
'skip-test=s' => \$opt_skip_test,
'big-test' => \$opt_big_test,
'combination=s' => \@opt_combinations,
@@ -605,11 +520,6 @@ sub command_line_setup () {
# Specify ports
'master_port=i' => \$opt_master_myport,
'slave_port=i' => \$opt_slave_myport,
- 'ndbcluster-port|ndbcluster_port=i' => \$opt_ndbcluster_port,
- 'ndbcluster-port-slave=i' => \$opt_ndbcluster_port_slave,
- 'im-port=i' => \$im_port, # Instance Manager port.
- 'im-mysqld1-port=i' => \$im_mysqld1_port, # Port of mysqld, controlled by IM
- 'im-mysqld2-port=i' => \$im_mysqld2_port, # Port of mysqld, controlled by IM
'mtr-build-thread=i' => \$opt_mtr_build_thread,
# Test case authoring
@@ -625,8 +535,6 @@ sub command_line_setup () {
# Run test on running server
'extern' => \$opt_extern,
- 'ndb-connectstring=s' => \$opt_ndbconnectstring,
- 'ndb-connectstring-slave=s' => \$opt_ndbconnectstring_slave,
# Debugging
'gdb' => \$opt_gdb,
@@ -800,7 +708,6 @@ sub command_line_setup () {
push(@glob_test_mode, "embedded");
$opt_skip_rpl= 1; # We never run replication with embedded
- $opt_skip_ndbcluster= 1; # Turn off use of NDB cluster
$opt_skip_ssl= 1; # Turn off use of SSL
# Turn off use of bin log
@@ -922,12 +829,6 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# Find out default storage engine being used(if any)
# --------------------------------------------------------------------------
- if ( $opt_with_ndbcluster )
- {
- # --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster
- push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster");
- }
-
foreach my $arg ( @opt_extra_mysqld_opt )
{
if ( $arg =~ /default-storage-engine=(\S+)/ )
@@ -1012,25 +913,6 @@ sub command_line_setup () {
$opt_tmpdir =~ s,/+$,,; # Remove ending slash if any
# --------------------------------------------------------------------------
- # Check im suport
- # --------------------------------------------------------------------------
- if ($opt_extern)
- {
- # mtr_report("Disable instance manager when running with extern mysqld");
- $opt_skip_im= 1;
- }
- elsif ( $mysql_version_id < 50000 )
- {
- # Instance manager is not supported until 5.0
- $opt_skip_im= 1;
- }
- elsif ( $glob_win32 )
- {
- mtr_report("Disable Instance manager - testing not supported on Windows");
- $opt_skip_im= 1;
- }
-
- # --------------------------------------------------------------------------
# Record flag
# --------------------------------------------------------------------------
if ( $opt_record and ! @opt_cases )
@@ -1188,7 +1070,6 @@ sub command_line_setup () {
path_sock => "$sockdir/master.sock",
port => $opt_master_myport,
start_timeout => 400, # enough time create innodb tables
- cluster => 0, # index in clusters list
start_opts => [],
};
@@ -1203,7 +1084,6 @@ sub command_line_setup () {
path_sock => "$sockdir/master1.sock",
port => $opt_master_myport + 1,
start_timeout => 400, # enough time create innodb tables
- cluster => 0, # index in clusters list
start_opts => [],
};
@@ -1219,7 +1099,6 @@ sub command_line_setup () {
port => $opt_slave_myport,
start_timeout => 400,
- cluster => 1, # index in clusters list
start_opts => [],
};
@@ -1234,7 +1113,6 @@ sub command_line_setup () {
path_sock => "$sockdir/slave1.sock",
port => $opt_slave_myport + 1,
start_timeout => 300,
- cluster => -1, # index in clusters list
start_opts => [],
};
@@ -1249,91 +1127,9 @@ sub command_line_setup () {
path_sock => "$sockdir/slave2.sock",
port => $opt_slave_myport + 2,
start_timeout => 300,
- cluster => -1, # index in clusters list
start_opts => [],
};
- $instance_manager=
- {
- path_err => "$opt_vardir/log/im.err",
- path_log => "$opt_vardir/log/im.log",
- path_pid => "$opt_vardir/run/im.pid",
- path_angel_pid => "$opt_vardir/run/im.angel.pid",
- path_sock => "$sockdir/im.sock",
- port => $im_port,
- start_timeout => $master->[0]->{'start_timeout'},
- admin_login => 'im_admin',
- admin_password => 'im_admin_secret',
- admin_sha1 => '*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295',
- password_file => "$opt_vardir/im.passwd",
- defaults_file => "$opt_vardir/im.cnf",
- };
-
- $instance_manager->{'instances'}->[0]=
- {
- server_id => 1,
- port => $im_mysqld1_port,
- path_datadir => "$opt_vardir/im_mysqld_1.data",
- path_sock => "$sockdir/mysqld_1.sock",
- path_pid => "$opt_vardir/run/mysqld_1.pid",
- start_timeout => 400, # enough time create innodb tables
- old_log_format => 1
- };
-
- $instance_manager->{'instances'}->[1]=
- {
- server_id => 2,
- port => $im_mysqld2_port,
- path_datadir => "$opt_vardir/im_mysqld_2.data",
- path_sock => "$sockdir/mysqld_2.sock",
- path_pid => "$opt_vardir/run/mysqld_2.pid",
- nonguarded => 1,
- start_timeout => 400, # enough time create innodb tables
- old_log_format => 1
- };
-
- my $data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port";
- $clusters->[0]=
- {
- name => "Master",
- nodes => 2,
- port => "$opt_ndbcluster_port",
- data_dir => "$data_dir",
- connect_string => "host=localhost:$opt_ndbcluster_port",
- path_pid => "$data_dir/ndb_3.pid", # Nodes + 1
- pid => 0, # pid of ndb_mgmd
- installed_ok => 0,
- };
-
- $data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port_slave";
- $clusters->[1]=
- {
- name => "Slave",
- nodes => 1,
- port => "$opt_ndbcluster_port_slave",
- data_dir => "$data_dir",
- connect_string => "host=localhost:$opt_ndbcluster_port_slave",
- path_pid => "$data_dir/ndb_2.pid", # Nodes + 1
- pid => 0, # pid of ndb_mgmd
- installed_ok => 0,
- };
-
- # Init pids of ndbd's
- foreach my $cluster ( @{$clusters} )
- {
- for ( my $idx= 0; $idx < $cluster->{'nodes'}; $idx++ )
- {
- my $nodeid= $idx+1;
- $cluster->{'ndbds'}->[$idx]=
- {
- pid => 0,
- nodeid => $nodeid,
- path_pid => "$cluster->{'data_dir'}/ndb_${nodeid}.pid",
- path_fs => "$cluster->{'data_dir'}/ndb_${nodeid}_fs",
- };
- }
- }
-
# --------------------------------------------------------------------------
# extern
# --------------------------------------------------------------------------
@@ -1341,7 +1137,6 @@ sub command_line_setup () {
{
# Turn off features not supported when running with extern server
$opt_skip_rpl= 1;
- $opt_skip_ndbcluster= 1;
# Setup master->[0] with the settings for the extern server
$master->[0]->{'path_sock'}= $opt_socket ? $opt_socket : "/tmp/mysql.sock";
@@ -1354,41 +1149,10 @@ sub command_line_setup () {
}
- # --------------------------------------------------------------------------
- # ndbconnectstring and ndbconnectstring_slave
- # --------------------------------------------------------------------------
- if ( $opt_ndbconnectstring )
- {
- # ndbconnectstring was supplied by user, the tests shoudl be run
- # against an already started cluster, change settings
- my $cluster= $clusters->[0]; # Master cluster
- $cluster->{'connect_string'}= $opt_ndbconnectstring;
- $cluster->{'use_running'}= 1;
-
- mtr_error("Can't specify --ndb-connectstring and --skip-ndbcluster")
- if $opt_skip_ndbcluster;
- }
- $ENV{'NDB_CONNECTSTRING'}= $clusters->[0]->{'connect_string'};
-
-
- if ( $opt_ndbconnectstring_slave )
- {
- # ndbconnectstring-slave was supplied by user, the tests should be run
- # agains an already started slave cluster, change settings
- my $cluster= $clusters->[1]; # Slave cluster
- $cluster->{'connect_string'}= $opt_ndbconnectstring_slave;
- $cluster->{'use_running'}= 1;
-
- mtr_error("Can't specify ndb-connectstring_slave and " .
- "--skip-ndbcluster-slave")
- if $opt_skip_ndbcluster_slave;
- }
-
$path_timefile= "$opt_vardir/log/mysqltest-time";
$path_mysqltest_log= "$opt_vardir/log/mysqltest.log";
$path_current_test_log= "$opt_vardir/log/current_test";
- $path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
}
@@ -1422,11 +1186,6 @@ sub set_mtr_build_thread_ports($) {
# A magic value in command_line_setup depends on these equations.
$opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1
$opt_slave_myport= $opt_master_myport + 2; # and 3 4
- $opt_ndbcluster_port= $opt_master_myport + 5;
- $opt_ndbcluster_port_slave= $opt_master_myport + 6;
- $im_port= $opt_master_myport + 7;
- $im_mysqld1_port= $opt_master_myport + 8;
- $im_mysqld2_port= $opt_master_myport + 9;
if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 )
{
@@ -1449,14 +1208,6 @@ sub datadir_list_setup () {
{
push(@data_dir_lst, $slave->[$idx]->{'path_myddir'});
}
-
- unless ($opt_skip_im)
- {
- foreach my $instance (@{$instance_manager->{'instances'}})
- {
- push(@data_dir_lst, $instance->{'path_datadir'});
- }
- }
}
@@ -1584,45 +1335,6 @@ sub collect_mysqld_features_from_running_server ()
}
}
-sub executable_setup_ndb () {
-
- # Look for ndb tols and binaries
- my $ndb_path= mtr_file_exists("$glob_bindir/ndb",
- "$glob_bindir/storage/ndb",
- "$glob_bindir/bin");
-
- $exe_ndbd=
- mtr_exe_maybe_exists("$ndb_path/src/kernel/ndbd",
- "$ndb_path/ndbd",
- "$glob_bindir/libexec/ndbd");
- $exe_ndb_mgm=
- mtr_exe_maybe_exists("$ndb_path/src/mgmclient/ndb_mgm",
- "$ndb_path/ndb_mgm");
- $exe_ndb_mgmd=
- mtr_exe_maybe_exists("$ndb_path/src/mgmsrv/ndb_mgmd",
- "$ndb_path/ndb_mgmd",
- "$glob_bindir/libexec/ndb_mgmd");
- $exe_ndb_waiter=
- mtr_exe_maybe_exists("$ndb_path/tools/ndb_waiter",
- "$ndb_path/ndb_waiter");
-
- # May not exist
- $path_ndb_tools_dir= mtr_file_exists("$ndb_path/tools",
- "$ndb_path");
- # May not exist
- $path_ndb_examples_dir=
- mtr_file_exists("$ndb_path/ndbapi-examples",
- "$ndb_path/examples");
- # May not exist
- $exe_ndb_example=
- mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
-
- return ( $exe_ndbd eq "" or
- $exe_ndb_mgm eq "" or
- $exe_ndb_mgmd eq "" or
- $exe_ndb_waiter eq "");
-}
-
sub executable_setup () {
#
@@ -1693,18 +1405,6 @@ sub executable_setup () {
"$glob_basedir/share/mysql_fix_privilege_tables.sql",
"$glob_basedir/share/mysql/mysql_fix_privilege_tables.sql");
- if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
- {
- mtr_warning("Could not find all required ndb binaries, " .
- "all ndb tests will fail, use --skip-ndbcluster to " .
- "skip testing it.");
-
- foreach my $cluster (@{$clusters})
- {
- $cluster->{"executable_setup_failed"}= 1;
- }
- }
-
# Look for the udf_example library
$lib_udf_example=
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
@@ -1870,14 +1570,6 @@ sub environment_setup () {
}
}
- # --------------------------------------------------------------------------
- # Add the path where libndbclient can be found
- # --------------------------------------------------------------------------
- if ( $glob_ndbcluster_supported )
- {
- push(@ld_library_paths, "$glob_bindir/storage/ndb/src/.libs");
- }
-
# --------------------------------------------------------------------------
# Valgrind need to be run with debug libraries otherwise it's almost
# impossible to add correct supressions, that means if "/usr/lib/debug"
@@ -1955,64 +1647,10 @@ sub environment_setup () {
$ENV{'MYSQL_TCP_PORT'}= $mysqld_variables{'port'};
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'master-port'};
- $ENV{'IM_PATH_SOCK'}= $instance_manager->{path_sock};
- $ENV{'IM_USERNAME'}= $instance_manager->{admin_login};
- $ENV{'IM_PASSWORD'}= $instance_manager->{admin_password};
$ENV{MTR_BUILD_THREAD}= $opt_mtr_build_thread;
$ENV{'EXE_MYSQL'}= $exe_mysql;
-
- # ----------------------------------------------------
- # Setup env for NDB
- # ----------------------------------------------------
- if ( ! $opt_skip_ndbcluster )
- {
- $ENV{'NDB_MGM'}= $exe_ndb_mgm;
-
- $ENV{'NDBCLUSTER_PORT'}= $opt_ndbcluster_port;
- $ENV{'NDBCLUSTER_PORT_SLAVE'}= $opt_ndbcluster_port_slave;
-
- $ENV{'NDB_EXTRA_TEST'}= $opt_ndb_extra_test;
-
- $ENV{'NDB_BACKUP_DIR'}= $clusters->[0]->{'data_dir'};
- $ENV{'NDB_DATA_DIR'}= $clusters->[0]->{'data_dir'};
- $ENV{'NDB_TOOLS_DIR'}= $path_ndb_tools_dir;
- $ENV{'NDB_TOOLS_OUTPUT'}= $path_ndb_testrun_log;
-
- if ( $mysql_version_id >= 50000 )
- {
- $ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
- $ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
- }
- $ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
- }
-
- # ----------------------------------------------------
- # Setup env for IM
- # ----------------------------------------------------
- if ( ! $opt_skip_im )
- {
- $ENV{'IM_PATH_PID'}= $instance_manager->{path_pid};
- $ENV{'IM_PATH_ANGEL_PID'}= $instance_manager->{path_angel_pid};
- $ENV{'IM_PORT'}= $instance_manager->{port};
- $ENV{'IM_DEFAULTS_PATH'}= $instance_manager->{defaults_file};
- $ENV{'IM_PASSWORD_PATH'}= $instance_manager->{password_file};
-
- $ENV{'IM_MYSQLD1_SOCK'}=
- $instance_manager->{instances}->[0]->{path_sock};
- $ENV{'IM_MYSQLD1_PORT'}=
- $instance_manager->{instances}->[0]->{port};
- $ENV{'IM_MYSQLD1_PATH_PID'}=
- $instance_manager->{instances}->[0]->{path_pid};
- $ENV{'IM_MYSQLD2_SOCK'}=
- $instance_manager->{instances}->[1]->{path_sock};
- $ENV{'IM_MYSQLD2_PORT'}=
- $instance_manager->{instances}->[1]->{port};
- $ENV{'IM_MYSQLD2_PATH_PID'}=
- $instance_manager->{instances}->[1]->{path_pid};
- }
-
# ----------------------------------------------------
# Setup env so childs can execute mysqlcheck
# ----------------------------------------------------
@@ -2228,20 +1866,6 @@ sub environment_setup () {
print "Using SLAVE_MYPORT = $ENV{SLAVE_MYPORT}\n";
print "Using SLAVE_MYPORT1 = $ENV{SLAVE_MYPORT1}\n";
print "Using SLAVE_MYPORT2 = $ENV{SLAVE_MYPORT2}\n";
- if ( ! $opt_skip_ndbcluster )
- {
- print "Using NDBCLUSTER_PORT = $ENV{NDBCLUSTER_PORT}\n";
- if ( ! $opt_skip_ndbcluster_slave )
- {
- print "Using NDBCLUSTER_PORT_SLAVE = $ENV{NDBCLUSTER_PORT_SLAVE}\n";
- }
- }
- if ( ! $opt_skip_im )
- {
- print "Using IM_PORT = $ENV{IM_PORT}\n";
- print "Using IM_MYSQLD1_PORT = $ENV{IM_MYSQLD1_PORT}\n";
- print "Using IM_MYSQLD2_PORT = $ENV{IM_MYSQLD2_PORT}\n";
- }
}
# Create an environment variable to make it possible
@@ -2599,155 +2223,6 @@ sub vs_config_dirs ($$) {
"$glob_bindir/$path_part/debug/$exe");
}
-##############################################################################
-#
-# Start the ndb cluster
-#
-##############################################################################
-
-sub check_ndbcluster_support ($) {
- my $mysqld_variables= shift;
-
- if ($opt_skip_ndbcluster || $opt_extern)
- {
- if (!$opt_extern)
- {
- mtr_report("Skipping ndbcluster");
- }
- $opt_skip_ndbcluster_slave= 1;
- return;
- }
-
- if ( ! $mysqld_variables->{'ndb-connectstring'} )
- {
- mtr_report("Skipping ndbcluster, mysqld not compiled with ndbcluster");
- $opt_skip_ndbcluster= 1;
- $opt_skip_ndbcluster_slave= 1;
- return;
- }
- $glob_ndbcluster_supported= 1;
- mtr_report("Using ndbcluster when necessary, mysqld supports it");
-
- if ( $mysql_version_id < 50100 )
- {
- # Slave cluster is not supported until 5.1
- $opt_skip_ndbcluster_slave= 1;
-
- }
-
- return;
-}
-
-
-sub ndbcluster_start_install ($) {
- my $cluster= shift;
-
- mtr_report("Installing $cluster->{'name'} Cluster");
-
- mkdir($cluster->{'data_dir'});
-
- # Create a config file from template
- my $ndb_no_ord=512;
- my $ndb_no_attr=2048;
- my $ndb_con_op=105000;
- my $ndb_dmem="80M";
- my $ndb_imem="24M";
- my $ndb_pbmem="32M";
- my $nodes= $cluster->{'nodes'};
- my $ndb_host= "localhost";
- my $ndb_diskless= 0;
-
- if (!$opt_bench)
- {
- # Use a smaller configuration
- if ( $mysql_version_id < 50100 )
- {
- # 4.1 and 5.0 is using a "larger" --small configuration
- $ndb_no_ord=128;
- $ndb_con_op=10000;
- $ndb_dmem="40M";
- $ndb_imem="12M";
- }
- else
- {
- $ndb_no_ord=32;
- $ndb_con_op=10000;
- $ndb_dmem="20M";
- $ndb_imem="1M";
- $ndb_pbmem="4M";
- }
- }
-
- my $config_file_template= "lib/v1/ndb_config_${nodes}_node.ini";
- my $config_file= "$cluster->{'data_dir'}/config.ini";
-
- open(IN, $config_file_template)
- or mtr_error("Can't open $config_file_template: $!");
- open(OUT, ">", $config_file)
- or mtr_error("Can't write to $config_file: $!");
- while (<IN>)
- {
- chomp;
-
- s/CHOOSE_MaxNoOfAttributes/$ndb_no_attr/;
- s/CHOOSE_MaxNoOfOrderedIndexes/$ndb_no_ord/;
- s/CHOOSE_MaxNoOfConcurrentOperations/$ndb_con_op/;
- s/CHOOSE_DataMemory/$ndb_dmem/;
- s/CHOOSE_IndexMemory/$ndb_imem/;
- s/CHOOSE_Diskless/$ndb_diskless/;
- s/CHOOSE_HOSTNAME_.*/$ndb_host/;
- s/CHOOSE_FILESYSTEM/$cluster->{'data_dir'}/;
- s/CHOOSE_PORT_MGM/$cluster->{'port'}/;
- if ( $mysql_version_id < 50000 )
- {
- my $base_port= $cluster->{'port'} + 1;
- s/CHOOSE_PORT_TRANSPORTER/$base_port/;
- }
- s/CHOOSE_DiskPageBufferMemory/$ndb_pbmem/;
-
- print OUT "$_ \n";
- }
- close OUT;
- close IN;
-
-
- # Start cluster with "--initial"
-
- ndbcluster_start($cluster, "--initial");
-
- return 0;
-}
-
-
-sub ndbcluster_wait_started($$){
- my $cluster= shift;
- my $ndb_waiter_extra_opt= shift;
- my $path_waiter_log= "$cluster->{'data_dir'}/ndb_waiter.log";
- my $args;
-
- mtr_init_args(\$args);
-
- mtr_add_arg($args, "--no-defaults");
- mtr_add_arg($args, "--core");
- mtr_add_arg($args, "--ndb-connectstring=%s", $cluster->{'connect_string'});
- mtr_add_arg($args, "--timeout=60");
-
- if ($ndb_waiter_extra_opt)
- {
- mtr_add_arg($args, "$ndb_waiter_extra_opt");
- }
-
- # Start the ndb_waiter which will connect to the ndb_mgmd
- # and poll it for state of the ndbd's, will return when
- # all nodes in the cluster is started
- my $res= mtr_run($exe_ndb_waiter, $args,
- "", $path_waiter_log, $path_waiter_log, "");
- mtr_verbose("ndbcluster_wait_started, returns: $res") if $res;
- return $res;
-}
-
-
-
sub mysqld_wait_started($){
my $mysqld= shift;
@@ -2767,137 +2242,6 @@ sub mysqld_wait_started($){
}
-sub ndb_mgmd_wait_started($) {
- my ($cluster)= @_;
-
- my $retries= 100;
- while (ndbcluster_wait_started($cluster, "--no-contact") and
- $retries)
- {
- # Millisceond sleep emulated with select
- select(undef, undef, undef, (0.1));
-
- $retries--;
- }
-
- return $retries == 0;
-
-}
-
-sub ndb_mgmd_start ($) {
- my $cluster= shift;
-
- my $args; # Arg vector
- my $pid= -1;
-
- mtr_init_args(\$args);
- mtr_add_arg($args, "--no-defaults");
- mtr_add_arg($args, "--core");
- mtr_add_arg($args, "--nodaemon");
- mtr_add_arg($args, "--config-file=%s", "$cluster->{'data_dir'}/config.ini");
-
-
- my $path_ndb_mgmd_log= "$cluster->{'data_dir'}/\l$cluster->{'name'}_ndb_mgmd.log";
- $pid= mtr_spawn($exe_ndb_mgmd, $args, "",
- $path_ndb_mgmd_log,
- $path_ndb_mgmd_log,
- "",
- { append_log_file => 1 });
-
- # FIXME Should not be needed
- # Unfortunately the cluster nodes will fail to start
- # if ndb_mgmd has not started properly
- if (ndb_mgmd_wait_started($cluster))
- {
- mtr_error("Failed to wait for start of ndb_mgmd");
- }
-
- # Remember pid of ndb_mgmd
- $cluster->{'pid'}= $pid;
-
- mtr_verbose("ndb_mgmd_start, pid: $pid");
-
- return $pid;
-}
-
-
-sub ndbd_start ($$$) {
- my $cluster= shift;
- my $idx= shift;
- my $extra_args= shift;
-
- my $args; # Arg vector
- my $pid= -1;
-
- mtr_init_args(\$args);
- mtr_add_arg($args, "--no-defaults");
- mtr_add_arg($args, "--core");
- mtr_add_arg($args, "--ndb-connectstring=%s", "$cluster->{'connect_string'}");
- if ( $mysql_version_id >= 50000)
- {
- mtr_add_arg($args, "--character-sets-dir=%s", "$path_charsetsdir");
- }
- mtr_add_arg($args, "--nodaemon");
- mtr_add_arg($args, "$extra_args");
-
- my $nodeid= $cluster->{'ndbds'}->[$idx]->{'nodeid'};
- my $path_ndbd_log= "$cluster->{'data_dir'}/ndb_${nodeid}.log";
- $pid= mtr_spawn($exe_ndbd, $args, "",
- $path_ndbd_log,
- $path_ndbd_log,
- "",
- { append_log_file => 1 });
-
- # Add pid to list of pids for this cluster
- $cluster->{'ndbds'}->[$idx]->{'pid'}= $pid;
-
- # Rememeber options used when starting
- $cluster->{'ndbds'}->[$idx]->{'start_extra_args'}= $extra_args;
- $cluster->{'ndbds'}->[$idx]->{'idx'}= $idx;
-
- mtr_verbose("ndbd_start, pid: $pid");
-
- return $pid;
-}
-
-
-sub ndbcluster_start ($$) {
- my $cluster= shift;
- my $extra_args= shift;
-
- mtr_verbose("ndbcluster_start '$cluster->{'name'}'");
-
- if ( $cluster->{'use_running'} )
- {
- return 0;
- }
-
- if ( $cluster->{'pid'} )
- {
- mtr_error("Cluster '$cluster->{'name'}' already started");
- }
-
- ndb_mgmd_start($cluster);
-
- for ( my $idx= 0; $idx < $cluster->{'nodes'}; $idx++ )
- {
- ndbd_start($cluster, $idx, $extra_args);
- }
-
- return 0;
-}
-
-
-sub rm_ndbcluster_tables ($) {
- my $dir= shift;
- foreach my $bin ( glob("$dir/mysql/ndb_apply_status*"),
- glob("$dir/mysql/ndb_schema*"))
- {
- unlink($bin);
- }
-}
-
-
##############################################################################
#
# Run the benchmark suite
@@ -2929,11 +2273,6 @@ sub run_benchmarks ($) {
mtr_add_arg($args, "--small-tables");
}
- if ( $opt_with_ndbcluster )
- {
- mtr_add_arg($args, "--create-options=TYPE=ndb");
- }
-
chdir($glob_mysql_bench_dir)
or mtr_error("Couldn't chdir to '$glob_mysql_bench_dir': $!");
@@ -3078,69 +2417,6 @@ sub mysql_install_db () {
copy_install_db("slave".($idx+1), $slave->[$idx]->{'path_myddir'});
}
- if ( ! $opt_skip_im )
- {
- im_prepare_env($instance_manager);
- }
-
- my $cluster_started_ok= 1; # Assume it can be started
-
- my $cluster= $clusters->[0]; # Master cluster
- if ($opt_skip_ndbcluster ||
- $cluster->{'use_running'} ||
- $cluster->{executable_setup_failed})
- {
- # Don't install master cluster
- }
- elsif (ndbcluster_start_install($cluster))
- {
- mtr_warning("Failed to start install of $cluster->{name}");
- $cluster_started_ok= 0;
- }
-
- $cluster= $clusters->[1]; # Slave cluster
- if ($max_slave_num == 0 ||
- $opt_skip_ndbcluster_slave ||
- $cluster->{'use_running'} ||
- $cluster->{executable_setup_failed})
- {
- # Don't install slave cluster
- }
- elsif (ndbcluster_start_install($cluster))
- {
- mtr_warning("Failed to start install of $cluster->{name}");
- $cluster_started_ok= 0;
- }
-
- foreach $cluster (@{$clusters})
- {
-
- next if !$cluster->{'pid'};
-
- $cluster->{'installed_ok'}= 1; # Assume install suceeds
-
- if (ndbcluster_wait_started($cluster, ""))
- {
- # failed to install, disable usage and flag that its no ok
- mtr_report("ndbcluster_install of $cluster->{'name'} failed");
- $cluster->{"installed_ok"}= 0;
-
- $cluster_started_ok= 0;
- }
- }
-
- if ( ! $cluster_started_ok )
- {
- if ( $opt_force)
- {
- # Continue without cluster
- }
- else
- {
- mtr_error("To continue, re-run with '--force'.");
- }
- }
-
return 0;
}
@@ -3170,7 +2446,6 @@ sub install_db ($$) {
mtr_add_arg($args, "--bootstrap");
mtr_add_arg($args, "--basedir=%s", $glob_basedir);
mtr_add_arg($args, "--datadir=%s", $data_dir);
- mtr_add_arg($args, "--loose-skip-ndbcluster");
mtr_add_arg($args, "--loose-skip-aria");
mtr_add_arg($args, "--disable-sync-frm");
mtr_add_arg($args, "--loose-disable-debug");
@@ -3268,105 +2543,6 @@ sub install_db ($$) {
}
-sub im_prepare_env($) {
- my $instance_manager = shift;
-
- im_create_passwd_file($instance_manager);
- im_prepare_data_dir($instance_manager);
-}
-
-
-sub im_create_passwd_file($) {
- my $instance_manager = shift;
-
- my $pwd_file_path = $instance_manager->{'password_file'};
-
- mtr_report("Creating IM password file ($pwd_file_path)");
-
- open(OUT, ">", $pwd_file_path)
- or mtr_error("Can't write to $pwd_file_path: $!");
-
- print OUT $instance_manager->{'admin_login'}, ":",
- $instance_manager->{'admin_sha1'}, "\n";
-
- close(OUT);
-}
-
-
-sub im_create_defaults_file($) {
- my $instance_manager = shift;
-
- my $defaults_file = $instance_manager->{'defaults_file'};
-
- open(OUT, ">", $defaults_file)
- or mtr_error("Can't write to $defaults_file: $!");
-
- print OUT <<EOF
-[mysql]
-
-[manager]
-pid-file = $instance_manager->{path_pid}
-angel-pid-file = $instance_manager->{path_angel_pid}
-socket = $instance_manager->{path_sock}
-port = $instance_manager->{port}
-password-file = $instance_manager->{password_file}
-default-mysqld-path = $exe_mysqld
-
-EOF
-;
-
- foreach my $instance (@{$instance_manager->{'instances'}})
- {
- my $server_id = $instance->{'server_id'};
-
- print OUT <<EOF
-[mysqld$server_id]
-socket = $instance->{path_sock}
-pid-file = $instance->{path_pid}
-port = $instance->{port}
-datadir = $instance->{path_datadir}
-lc-messages-dir = $path_language
-log = $instance->{path_datadir}/mysqld$server_id.log
-log-error = $instance->{path_datadir}/mysqld$server_id.err.log
-log-slow-queries = $instance->{path_datadir}/mysqld$server_id.slow.log
-character-sets-dir = $path_charsetsdir
-basedir = $glob_basedir
-server_id = $server_id
-shutdown-delay = 10
-skip-stack-trace
-loose-skip-innodb
-loose-skip-ndbcluster
-EOF
-;
- if ( $mysql_version_id < 50100 )
- {
- print OUT "skip-bdb\n";
- }
- print OUT "nonguarded\n" if $instance->{'nonguarded'};
- if ( $mysql_version_id >= 50100 )
- {
- print OUT "log-output=FILE\n" if $instance->{'old_log_format'};
- }
- print OUT "\n";
- }
-
- close(OUT);
-}
-
-
-sub im_prepare_data_dir($) {
- my $instance_manager = shift;
-
- foreach my $instance (@{$instance_manager->{'instances'}})
- {
- copy_install_db(
- 'im_mysqld_' . $instance->{'server_id'},
- $instance->{'path_datadir'});
- }
-}
-
-
-
#
# Restore snapshot of the installed slave databases
# if the snapshot exists
@@ -3423,56 +2599,6 @@ sub run_testcase_check_skip_test($)
return 1;
}
- if ($tinfo->{'ndb_test'})
- {
- foreach my $cluster (@{$clusters})
- {
- # Slave cluster is skipped and thus not
- # installed, no need to perform checks
- last if ($opt_skip_ndbcluster_slave and
- $cluster->{'name'} eq 'Slave');
-
- # Using running cluster - no need
- # to check if test should be skipped
- # will be done by test itself
- last if ($cluster->{'use_running'});
-
- # If test needs this cluster, check binaries was found ok
- if ( $cluster->{'executable_setup_failed'} )
- {
- mtr_report_test_name($tinfo);
- $tinfo->{comment}=
- "Failed to find cluster binaries";
- mtr_report_test_failed($tinfo);
- return 1;
- }
-
- # If test needs this cluster, check it was installed ok
- if ( !$cluster->{'installed_ok'} )
- {
- mtr_report_test_name($tinfo);
- $tinfo->{comment}=
- "Cluster $cluster->{'name'} was not installed ok";
- mtr_report_test_failed($tinfo);
- return 1;
- }
-
- }
- }
-
- if ( $tinfo->{'component_id'} eq 'im' )
- {
- # If test needs im, check binaries was found ok
- if ( $instance_manager->{'executable_setup_failed'} )
- {
- mtr_report_test_name($tinfo);
- $tinfo->{comment}=
- "Failed to find MySQL manager binaries";
- mtr_report_test_failed($tinfo);
- return 1;
- }
- }
-
return 0;
}
@@ -3492,15 +2618,6 @@ sub do_before_run_mysqltest($)
if (!$opt_extern)
{
- if ( $mysql_version_id < 50000 ) {
- # Set environment variable NDB_STATUS_OK to 1
- # if script decided to run mysqltest cluster _is_ installed ok
- $ENV{'NDB_STATUS_OK'} = "1";
- } elsif ( $mysql_version_id < 50100 ) {
- # Set environment variable NDB_STATUS_OK to YES
- # if script decided to run mysqltest cluster _is_ installed ok
- $ENV{'NDB_STATUS_OK'} = "YES";
- }
if (defined $tinfo->{binlog_format} and $mysql_version_id > 50100 )
{
# Dynamically switch binlog format of
@@ -3552,16 +2669,6 @@ sub run_testcase_mark_logs($$)
{
mtr_tofile($mysqld->{path_myerr}, $log_msg);
}
-
- if ( $tinfo->{'component_id'} eq 'im')
- {
- mtr_tofile($instance_manager->{path_err}, $log_msg);
- mtr_tofile($instance_manager->{path_log}, $log_msg);
- }
-
- # ndbcluster log file
- mtr_tofile($path_ndb_testrun_log, $log_msg);
-
}
sub find_testcase_skipped_reason($)
@@ -3716,15 +2823,6 @@ sub run_testcase ($) {
# Remove the file that mysqltest writes info to
unlink($path_timefile);
-
- # ----------------------------------------------------------------------
- # Stop Instance Manager if we are processing an IM-test case.
- # ----------------------------------------------------------------------
- if ( $tinfo->{'component_id'} eq 'im' and
- !mtr_im_stop($instance_manager, $tinfo->{'name'}))
- {
- mtr_error("Failed to stop Instance Manager.")
- }
}
@@ -3785,16 +2883,6 @@ sub restore_installed_db ($) {
mtr_rmtree("$data_dir");
mtr_copy_dir("$path_snapshot/$name", "$data_dir");
}
-
- # Remove the ndb_*_fs dirs for all ndbd nodes
- # forcing a clean start of ndb
- foreach my $cluster (@{$clusters})
- {
- foreach my $ndbd (@{$cluster->{'ndbds'}})
- {
- mtr_rmtree("$ndbd->{'path_fs'}" );
- }
- }
}
else
{
@@ -4025,23 +3113,6 @@ sub mysqld_arguments ($$$$) {
$prefix);
mtr_add_arg($args, "%s--local-infile", $prefix);
-
- my $cluster= $clusters->[$mysqld->{'cluster'}];
- if ( $cluster->{'pid'} || # Cluster is started
- $cluster->{'use_running'} ) # Using running cluster
- {
- mtr_add_arg($args, "%s--ndbcluster", $prefix);
- mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
- $cluster->{'connect_string'});
- if ( $mysql_version_id >= 50100 )
- {
- mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
- }
- }
- else
- {
- mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix);
- }
}
else
{
@@ -4109,25 +3180,6 @@ sub mysqld_arguments ($$$$) {
mtr_add_arg($args, "%s--server-id=%d", $prefix, $slave_server_id);
mtr_add_arg($args, "%s--rpl-recovery-rank=%d", $prefix, $slave_rpl_rank);
}
-
- my $cluster= $clusters->[$mysqld->{'cluster'}];
- if ( $cluster->{'pid'} || # Slave cluster is started
- $cluster->{'use_running'} ) # Using running slave cluster
- {
- mtr_add_arg($args, "%s--ndbcluster", $prefix);
- mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
- $cluster->{'connect_string'});
-
- if ( $mysql_version_id >= 50100 )
- {
- mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
- }
- }
- else
- {
- mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix);
- }
-
} # end slave
if ( $debug_compiled_binaries && defined $opt_debug )
@@ -4315,15 +3367,6 @@ sub stop_all_servers () {
mtr_report("Stopping All Servers");
- if ( ! $opt_skip_im )
- {
- mtr_report("Shutting-down Instance Manager");
- unless (mtr_im_stop($instance_manager, "stop_all_servers"))
- {
- mtr_error("Failed to stop Instance Manager.")
- }
- }
-
my %admin_pids; # hash of admin processes that requests shutdown
my @kill_pids; # list of processes to shutdown/kill
my $pid;
@@ -4349,45 +3392,11 @@ sub stop_all_servers () {
}
}
- # Start shutdown of clusters
- foreach my $cluster (@{$clusters})
- {
- if ( $cluster->{'pid'} )
- {
- $pid= mtr_ndbmgm_start($cluster, "shutdown");
- $admin_pids{$pid}= 1;
-
- push(@kill_pids,{
- pid => $cluster->{'pid'},
- pidfile => $cluster->{'path_pid'}
- });
-
- $cluster->{'pid'}= 0; # Assume we are done with it
-
- foreach my $ndbd (@{$cluster->{'ndbds'}})
- {
- if ( $ndbd->{'pid'} )
- {
- push(@kill_pids,{
- pid => $ndbd->{'pid'},
- pidfile => $ndbd->{'path_pid'},
- });
- $ndbd->{'pid'}= 0;
- }
- }
- }
- }
-
# Wait blocking until all shutdown processes has completed
mtr_wait_blocking(\%admin_pids);
# Make sure that process has shutdown else try to kill them
mtr_check_stop_servers(\@kill_pids);
-
- foreach my $mysqld (@{$master}, @{$slave})
- {
- rm_ndbcluster_tables($mysqld->{'path_myddir'});
- }
}
@@ -4413,25 +3422,6 @@ sub run_testcase_need_master_restart($)
$do_restart= 1; # Always restart if --force-restart in -opt file
mtr_verbose("Restart master: Restart forced with --force-restart");
}
- elsif ( ! $opt_skip_ndbcluster and
- !$tinfo->{'ndb_test'} and
- $clusters->[0]->{'pid'} != 0 )
- {
- $do_restart= 1; # Restart without cluster
- mtr_verbose("Restart master: Test does not need cluster");
- }
- elsif ( ! $opt_skip_ndbcluster and
- $tinfo->{'ndb_test'} and
- $clusters->[0]->{'pid'} == 0 )
- {
- $do_restart= 1; # Restart with cluster
- mtr_verbose("Restart master: Test need cluster");
- }
- elsif( $tinfo->{'component_id'} eq 'im' )
- {
- $do_restart= 1;
- mtr_verbose("Restart master: Always restart for im tests");
- }
elsif ( $master->[0]->{'running_master_options'} and
$master->[0]->{'running_master_options'}->{'timezone'} ne
$tinfo->{'timezone'})
@@ -4556,30 +3546,6 @@ sub run_testcase_stop_servers($$$) {
$mysqld->{'pid'}= 0; # Assume we are done with it
}
}
-
- # Start shutdown of master cluster
- my $cluster= $clusters->[0];
- if ( $cluster->{'pid'} )
- {
- $pid= mtr_ndbmgm_start($cluster, "shutdown");
- $admin_pids{$pid}= 1;
-
- push(@kill_pids,{
- pid => $cluster->{'pid'},
- pidfile => $cluster->{'path_pid'}
- });
-
- $cluster->{'pid'}= 0; # Assume we are done with it
-
- foreach my $ndbd (@{$cluster->{'ndbds'}})
- {
- push(@kill_pids,{
- pid => $ndbd->{'pid'},
- pidfile => $ndbd->{'path_pid'},
- });
- $ndbd->{'pid'}= 0; # Assume we are done with it
- }
- }
}
if ( $do_restart || $do_slave_restart )
@@ -4609,31 +3575,6 @@ sub run_testcase_stop_servers($$$) {
$mysqld->{'pid'}= 0; # Assume we are done with it
}
}
-
- # Start shutdown of slave cluster
- my $cluster= $clusters->[1];
- if ( $cluster->{'pid'} )
- {
- $pid= mtr_ndbmgm_start($cluster, "shutdown");
-
- $admin_pids{$pid}= 1;
-
- push(@kill_pids,{
- pid => $cluster->{'pid'},
- pidfile => $cluster->{'path_pid'}
- });
-
- $cluster->{'pid'}= 0; # Assume we are done with it
-
- foreach my $ndbd (@{$cluster->{'ndbds'}} )
- {
- push(@kill_pids,{
- pid => $ndbd->{'pid'},
- pidfile => $ndbd->{'path_pid'},
- });
- $ndbd->{'pid'}= 0; # Assume we are done with it
- }
- }
}
# ----------------------------------------------------------------------
@@ -4647,15 +3588,6 @@ sub run_testcase_stop_servers($$$) {
# Make sure that process has shutdown else try to kill them
mtr_check_stop_servers(\@kill_pids);
-
- foreach my $mysqld (@{$master}, @{$slave})
- {
- if ( ! $mysqld->{'pid'} )
- {
- # Remove ndbcluster tables if server is stopped
- rm_ndbcluster_tables($mysqld->{'path_myddir'});
- }
- }
}
@@ -4675,14 +3607,6 @@ sub run_testcase_start_servers($) {
if ( $tinfo->{'component_id'} eq 'mysqld' )
{
- if ( ! $opt_skip_ndbcluster and
- !$clusters->[0]->{'pid'} and
- $tinfo->{'ndb_test'} )
- {
- # Test need cluster, cluster is not started, start it
- ndbcluster_start($clusters->[0], "");
- }
-
if ( !$master->[0]->{'pid'} )
{
# Master mysqld is not started
@@ -4692,48 +3616,9 @@ sub run_testcase_start_servers($) {
}
- if ( $clusters->[0]->{'pid'} || $clusters->[0]->{'use_running'}
- and ! $master->[1]->{'pid'} and
- $tinfo->{'master_num'} > 1 )
- {
- # Test needs cluster, start an extra mysqld connected to cluster
-
- if ( $mysql_version_id >= 50100 )
- {
- # First wait for first mysql server to have created ndb system
- # tables ok FIXME This is a workaround so that only one mysqld
- # create the tables
- if ( ! sleep_until_file_created(
- "$master->[0]->{'path_myddir'}/mysql/ndb_apply_status.ndb",
- $master->[0]->{'start_timeout'},
- $master->[0]->{'pid'}))
- {
-
- $tinfo->{'comment'}= "Failed to create 'mysql/ndb_apply_status' table";
- return 1;
- }
- }
- mysqld_start($master->[1],$tinfo->{'master_opt'},[]);
- }
-
# Save this test case information, so next can examine it
$master->[0]->{'running_master_options'}= $tinfo;
}
- elsif ( ! $opt_skip_im and $tinfo->{'component_id'} eq 'im' )
- {
- # We have to create defaults file every time, in order to ensure that it
- # will be the same for each test. The problem is that test can change the
- # file (by SET/UNSET commands), so w/o recreating the file, execution of
- # one test can affect the other.
-
- im_create_defaults_file($instance_manager);
-
- if ( ! mtr_im_start($instance_manager, $tinfo->{im_opts}) )
- {
- $tinfo->{'comment'}= "Failed to start Instance Manager. ";
- return 1;
- }
- }
# ----------------------------------------------------------------------
# Start slaves - if needed
@@ -4744,14 +3629,6 @@ sub run_testcase_start_servers($) {
do_before_start_slave($tinfo);
- if ( ! $opt_skip_ndbcluster_slave and
- !$clusters->[1]->{'pid'} and
- $tinfo->{'ndb_test'} )
- {
- # Test need slave cluster, cluster is not started, start it
- ndbcluster_start($clusters->[1], "");
- }
-
for ( my $idx= 0; $idx < $tinfo->{'slave_num'}; $idx++ )
{
if ( ! $slave->[$idx]->{'pid'} )
@@ -4766,20 +3643,6 @@ sub run_testcase_start_servers($) {
$slave->[0]->{'running_slave_options'}= $tinfo;
}
- # Wait for clusters to start
- foreach my $cluster (@{$clusters})
- {
-
- next if !$cluster->{'pid'};
-
- if (ndbcluster_wait_started($cluster, ""))
- {
- # failed to start
- $tinfo->{'comment'}= "Start of $cluster->{'name'} cluster failed";
- return 1;
- }
- }
-
# Wait for mysqld's to start
foreach my $mysqld (@{$master},@{$slave})
{
@@ -4908,14 +3771,7 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--mark-progress")
if $opt_mark_progress;
- if ($tinfo->{'component_id'} eq 'im')
- {
- mtr_add_arg($args, "--socket=%s", $instance_manager->{'path_sock'});
- mtr_add_arg($args, "--port=%d", $instance_manager->{'port'});
- mtr_add_arg($args, "--user=%s", $instance_manager->{'admin_login'});
- mtr_add_arg($args, "--password=%s", $instance_manager->{'admin_password'});
- }
- else # component_id == mysqld
+ # component_id == mysqld
{
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_sock'});
mtr_add_arg($args, "--port=%d", $master->[0]->{'port'});
@@ -5325,7 +4181,6 @@ Options to control what engine/variation to run
skip-ssl Dont start server with support for ssl connections
bench Run the benchmark suite
small-bench Run the benchmarks with --small-tests --small-tables
- ndb|with-ndbcluster Use cluster as default table type
vs-config Visual Studio configuration used to create executables
(default: MTR_VS_CONFIG environment variable)
@@ -5347,10 +4202,6 @@ Options to control directories to use
Options to control what test suites or cases to run
force Continue to run the suite after failure
- with-ndbcluster-only Run only tests that include "ndb" in the filename
- skip-ndb[cluster] Skip all tests that need cluster
- skip-ndb[cluster]-slave Skip all tests that need a slave cluster
- ndb-extra Run extra tests from ndb directory
do-test=PREFIX or REGEX
Run test cases which name are prefixed with PREFIX
or fulfills REGEX
@@ -5362,7 +4213,6 @@ Options to control what test suites or cases to run
list of suite names.
The default is: "$opt_suites_default"
skip-rpl Skip the replication test cases.
- skip-im Don't start IM, and skip the IM test cases
big-test Set the environment variable BIG_TEST, which can be
checked from test cases.
combination="ARG1 .. ARG2" Specify a set of "mysqld" arguments for one
@@ -5373,8 +4223,6 @@ Options that specify ports
master_port=PORT Specify the port number used by the first master
slave_port=PORT Specify the port number used by the first slave
- ndbcluster-port=PORT Specify the port number used by cluster
- ndbcluster-port-slave=PORT Specify the port number used by slave cluster
mtr-build-thread=# Specify unique collection of ports. Can also be set by
setting the environment variable MTR_BUILD_THREAD.
@@ -5391,8 +4239,6 @@ Options that pass on options
Options to run test on running server
extern Use running server for tests
- ndb-connectstring=STR Use running cluster, and connect using STR
- ndb-connectstring-slave=STR Use running slave cluster, and connect using STR
user=USER User for connection to extern server
socket=PATH Socket for connection to extern server