From edc0e9fba8e721f6e04cf1051a4413b1b885d18c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Sep 2006 10:01:47 +0200 Subject: [PATCH] Use "--skip-innodb" if running with testcases that does not need innodb Decreases test time when running a selected number of tests mysql-test/lib/mtr_cases.pl: Remove fixme, it's fiexd now mysql-test/mysql-test-run.pl: Use "--skip-innodb" if running with testcases that does not need innodb --- mysql-test/lib/mtr_cases.pl | 8 -------- mysql-test/mysql-test-run.pl | 10 +++++----- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index b0ba27e6736..daed111dfce 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -469,14 +469,6 @@ sub collect_one_test_case($$$$$$$) { { mtr_options_from_test_file($tinfo,"$testdir/${tname}.test"); - if ( ! $tinfo->{'innodb_test'} ) - { - # mtr_verbose("Adding '--skip-innodb' to $tinfo->{'name'}"); - # FIXME activate the --skip-innodb only when running with - # selected test cases - # push(@{$tinfo->{'master_opt'}}, "--skip-innodb"); - } - if ( $tinfo->{'big_test'} and ! $::opt_big_test ) { $tinfo->{'skip'}= 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b3dd5a26085..cb7d8a16b90 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -258,6 +258,7 @@ our $opt_result_ext; our $opt_skip; our $opt_skip_rpl; our $use_slaves; +our $use_innodb; our $opt_skip_test; our $opt_skip_im; @@ -428,6 +429,7 @@ sub main () { $need_ndbcluster||= $test->{ndb_test}; $need_im||= $test->{component_id} eq 'im'; $use_slaves||= $test->{slave_num}; + $use_innodb||= $test->{'innodb_test'}; } $opt_skip_ndbcluster= $opt_skip_ndbcluster_slave= 1 unless $need_ndbcluster; @@ -2236,8 +2238,9 @@ sub initialize_servers () { sub mysql_install_db () { - # FIXME not exactly true I think, needs improvements install_db('master', $master->[0]->{'path_myddir'}); + + # FIXME check if testcase really is using second master copy_install_db('master', $master->[1]->{'path_myddir'}); if ( $use_slaves ) @@ -2252,10 +2255,8 @@ sub mysql_install_db () { im_prepare_env($instance_manager); } - my $cluster_started_ok= 1; # Assume it can be started - if (ndbcluster_start_install($clusters->[0]) || $use_slaves && ndbcluster_start_install($clusters->[1])) { @@ -2263,7 +2264,6 @@ sub mysql_install_db () { $cluster_started_ok= 0; } - foreach my $cluster (@{$clusters}) { @@ -2903,7 +2903,7 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--datadir=%s", $prefix, $master->[$idx]->{'path_myddir'}); - if ( $idx > 0 ) + if ( $idx > 0 or !$use_innodb) { mtr_add_arg($args, "%s--skip-innodb", $prefix); }