From 36155b63eb94bc7d558abad025af1b7029a0577c Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Thu, 27 Apr 2006 10:53:19 -0700 Subject: [PATCH] Bug #19393: Federated tests fail on Windows under pushbuild Supplying --skip-rpl to mysql-test-run.pl would always disable the slaves, but those slaves may still be needed for the federated tests. Now we only disable the slaves when they are not used by any of the tests. --- mysql-test/mysql-test-run.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index bc24b77207f..a2e1df51464 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 $opt_skip_test; our $opt_skip_im; @@ -407,16 +408,15 @@ sub main () { my $tests= collect_test_cases($opt_suite); # Turn off NDB and other similar options if no tests use it - my ($need_ndbcluster,$need_im,$need_slave); + my ($need_ndbcluster,$need_im); foreach my $test (@$tests) { $need_ndbcluster||= $test->{ndb_test}; $need_im||= $test->{component_id} eq 'im'; - $need_slave||= $test->{slave_num}; + $use_slaves||= $test->{slave_num}; } $opt_with_ndbcluster= 0 unless $need_ndbcluster; $opt_skip_im= 1 unless $need_im; - $opt_skip_rpl= 1 unless $need_slave; snapshot_setup(); initialize_servers(); @@ -981,7 +981,7 @@ sub snapshot_setup () { $master->[0]->{'path_myddir'}, $master->[1]->{'path_myddir'}); - unless ($opt_skip_rpl) + if ($use_slaves) { push @data_dir_lst, ($slave->[0]->{'path_myddir'}, $slave->[1]->{'path_myddir'}, @@ -1636,7 +1636,7 @@ sub mysql_install_db () { install_db('master', $master->[0]->{'path_myddir'}); install_db('master', $master->[1]->{'path_myddir'}); - if ( ! $opt_skip_rpl ) + if ( $use_slaves ) { install_db('slave', $slave->[0]->{'path_myddir'}); install_db('slave', $slave->[1]->{'path_myddir'});