1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

test both federated and federatedX in the federated suite.

mysql-test/lib/My/Options.pm:
  My::Options::is_set() now matches both option names and values!
mysql-test/lib/mtr_cases.pm:
  1. don't merge --plugin-load here, it's too early
  2. don't skip combinations that set --plugin-load just because the test needs another --plugin-load.
     Skip *only* if test's --plugin-load matches *exactly* --plugin-load of one of the combinations.
  3. if skipping all combinations but one, still assign the test to the combination
mysql-test/mysql-test-run.pl:
  1. remove dead code - don't set variables that aren't used.
  2. bugfix: allow one-letter combination names
  3. in the command line, merge all --plugin-load options in one
storage/federated/ha_federated.cc:
  bugfix: garbage character in the generated SELECT query
This commit is contained in:
Sergei Golubchik
2011-11-30 11:37:28 +01:00
parent be505e3ebf
commit ca5b1b5431
20 changed files with 75 additions and 185 deletions

View File

@ -491,20 +491,32 @@ sub collect_one_suite
#print_testcases(@cases);
my @new_cases;
foreach my $comb (@combinations)
TEST: foreach my $test (@cases)
{
foreach my $test (@cases)
{
if ( $test->{'skip'} )
{
push(@new_cases, $test);
next;
}
next if ( $test->{'skip'} );
# Skip this combination if the values it provides
# already are set in master_opt or slave_opt
foreach my $comb (@combinations)
{
# Skip all other combinations if the values they change
# are already fixed in master_opt or slave_opt
if (My::Options::is_set($test->{master_opt}, $comb->{comb_opt}) &&
My::Options::is_set($test->{slave_opt}, $comb->{comb_opt}) ){
next;
}
# Add combination name short name
$test->{combination}= $comb->{name};
# Add the test to new test cases list
push(@new_cases, $test);
next TEST;
}
}
foreach my $comb (@combinations)
{
# Copy test options
my $new_test= My::Test->new();
while (my ($key, $value) = each(%$test)) {
@ -527,17 +539,6 @@ sub collect_one_suite
}
}
# Add the plain test if it was not already added
# as part of a combination
my %added;
foreach my $new_test (@new_cases){
$added{$new_test->{name}}= 1;
}
foreach my $test (@cases){
push(@new_cases, $test) unless $added{$test->{name}};
}
#print_testcases(@new_cases);
@cases= @new_cases;
#print_testcases(@cases);
@ -661,9 +662,6 @@ sub process_opts {
my @opts= @{$tinfo->{$opt_name}};
$tinfo->{$opt_name} = [];
my @plugins;
my %seen;
foreach my $opt (@opts)
{
my $value;
@ -679,14 +677,6 @@ sub process_opts {
next;
}
$value= mtr_match_prefix($opt, "--plugin-load=");
if (defined $value)
{
push @plugins, $value unless $seen{$value};
$seen{$value}=1;
next;
}
$value= mtr_match_prefix($opt, "--result-file=");
if ( defined $value )
{
@ -733,11 +723,6 @@ sub process_opts {
# Ok, this was a real option, add it
push(@{$tinfo->{$opt_name}}, $opt);
}
if (@plugins) {
my $sep = (IS_WINDOWS) ? ';' : ':';
push @{$tinfo->{$opt_name}}, "--plugin-load=" . join($sep, @plugins);
}
}