mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
This commit is contained in:
@ -64,12 +64,16 @@ sub fix_pidfile {
|
||||
|
||||
sub fix_port {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
return $self->{PORT}++;
|
||||
my $hostname= $group->value('#host');
|
||||
return $self->{HOSTS}->{$hostname}++;
|
||||
}
|
||||
|
||||
sub fix_host {
|
||||
my ($self)= @_;
|
||||
'localhost'
|
||||
# Get next host from HOSTS array
|
||||
my @hosts= keys(%{$self->{HOSTS}});;
|
||||
my $host_no= $self->{NEXT_HOST}++ % @hosts;
|
||||
return $hosts[$host_no];
|
||||
}
|
||||
|
||||
sub is_unique {
|
||||
@ -145,7 +149,6 @@ sub fix_secure_file_priv {
|
||||
|
||||
sub fix_std_data {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
#return "$::opt_vardir/std_data";
|
||||
my $testdir= $self->get_testdir($group);
|
||||
return "$testdir/std_data";
|
||||
}
|
||||
@ -234,7 +237,7 @@ if (IS_WINDOWS)
|
||||
sub fix_ndb_mgmd_port {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
my $hostname= $group->value('HostName');
|
||||
return $self->{PORT}++;
|
||||
return $self->{HOSTS}->{$hostname}++;
|
||||
}
|
||||
|
||||
|
||||
@ -433,24 +436,20 @@ sub post_check_embedded_group {
|
||||
|
||||
sub resolve_at_variable {
|
||||
my ($self, $config, $group, $option)= @_;
|
||||
local $_ = $option->value();
|
||||
my ($res, $after);
|
||||
|
||||
while (m/(.*?)\@((?:\w+\.)+)(#?[-\w]+)/g) {
|
||||
my ($before, $group_name, $option_name)= ($1, $2, $3);
|
||||
$after = $';
|
||||
chop($group_name);
|
||||
# Split the options value on last .
|
||||
my @parts= split(/\./, $option->value());
|
||||
my $option_name= pop(@parts);
|
||||
my $group_name= join('.', @parts);
|
||||
|
||||
my $from_group= $config->group($group_name)
|
||||
or croak "There is no group named '$group_name' that ",
|
||||
"can be used to resolve '$option_name'";
|
||||
$group_name =~ s/^\@//; # Remove at
|
||||
|
||||
my $value= $from_group->value($option_name);
|
||||
$res .= $before.$value;
|
||||
}
|
||||
$res .= $after;
|
||||
my $from_group= $config->group($group_name)
|
||||
or croak "There is no group named '$group_name' that ",
|
||||
"can be used to resolve '$option_name'";
|
||||
|
||||
$config->insert($group->name(), $option->name(), $res)
|
||||
my $from= $from_group->value($option_name);
|
||||
$config->insert($group->name(), $option->name(), $from)
|
||||
}
|
||||
|
||||
|
||||
@ -462,7 +461,7 @@ sub post_fix_resolve_at_variables {
|
||||
next unless defined $option->value();
|
||||
|
||||
$self->resolve_at_variable($config, $group, $option)
|
||||
if ($option->value() =~ /\@/);
|
||||
if ($option->value() =~ /^\@/);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -604,12 +603,25 @@ sub new_config {
|
||||
croak "you must pass '$required'" unless defined $args->{$required};
|
||||
}
|
||||
|
||||
# Fill in hosts/port hash
|
||||
my $hosts= {};
|
||||
my $baseport= $args->{baseport};
|
||||
$args->{hosts}= [ 'localhost' ] unless exists($args->{hosts});
|
||||
foreach my $host ( @{$args->{hosts}} ) {
|
||||
$hosts->{$host}= $baseport;
|
||||
}
|
||||
|
||||
# Open the config template
|
||||
my $config= My::Config->new($args->{'template_path'});
|
||||
my $extra_template_path= $args->{'extra_template_path'};
|
||||
if ($extra_template_path){
|
||||
$config->append(My::Config->new($extra_template_path));
|
||||
}
|
||||
my $self= bless {
|
||||
CONFIG => $config,
|
||||
ARGS => $args,
|
||||
PORT => $args->{baseport},
|
||||
HOSTS => $hosts,
|
||||
NEXT_HOST => 0,
|
||||
SERVER_ID => 1,
|
||||
}, $class;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2005-2006 MySQL AB
|
||||
#
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
@ -143,7 +143,7 @@ sub collect_test_cases ($$$) {
|
||||
{
|
||||
last unless $opt_reorder;
|
||||
# test->{name} is always in suite.name format
|
||||
if ( $test->{name} =~ /.*\.$tname/ )
|
||||
if ( $test->{name} =~ /^$sname.*\.$tname$/ )
|
||||
{
|
||||
$found= 1;
|
||||
last;
|
||||
@ -183,12 +183,21 @@ sub collect_test_cases ($$$) {
|
||||
# Append the criteria for sorting, in order of importance.
|
||||
#
|
||||
push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "A" : "B"));
|
||||
push(@criteria, $tinfo->{template_path});
|
||||
# Group test with equal options together.
|
||||
# Ending with "~" makes empty sort later than filled
|
||||
my $opts= $tinfo->{'master_opt'} ? $tinfo->{'master_opt'} : [];
|
||||
push(@criteria, join("!", sort @{$opts}) . "~");
|
||||
# Add slave opts if any
|
||||
if ($tinfo->{'slave_opt'})
|
||||
{
|
||||
push(@criteria, join("!", sort @{$tinfo->{'slave_opt'}}));
|
||||
}
|
||||
# This sorts tests with force-restart *before* identical tests
|
||||
push(@criteria, $tinfo->{force_restart} ? "force-restart" : "no-restart");
|
||||
|
||||
$sort_criteria{$tinfo->fullname()} = join(" ", @criteria);
|
||||
$tinfo->{criteria}= join(" ", @criteria);
|
||||
$sort_criteria{$tinfo->fullname()} = $tinfo->{criteria};
|
||||
}
|
||||
|
||||
@$cases = sort { testcase_sort_order($a, $b, \%sort_criteria) } @$cases;
|
||||
@ -196,9 +205,10 @@ sub collect_test_cases ($$$) {
|
||||
# For debugging the sort-order
|
||||
# foreach my $tinfo (@$cases)
|
||||
# {
|
||||
# print $sort_criteria{$tinfo->fullname()}," -> \t",$tinfo->fullname(),"\n";
|
||||
# my $tname= $tinfo->{name} . ' ' . $tinfo->{combination};
|
||||
# my $crit= $tinfo->{criteria};
|
||||
# print("$tname\n\t$crit\n");
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
if (defined $print_testcases){
|
||||
@ -902,7 +912,7 @@ sub collect_one_test_case {
|
||||
if ( $tinfo->{'big_test'} and ! $::opt_big_test )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Test needs 'big-test' option";
|
||||
$tinfo->{'comment'}= "Test needs --big-test";
|
||||
return $tinfo
|
||||
}
|
||||
|
||||
@ -927,7 +937,7 @@ sub collect_one_test_case {
|
||||
{
|
||||
# All ndb test's should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
|
||||
$tinfo->{'comment'}= "No ndbcluster";
|
||||
return $tinfo;
|
||||
}
|
||||
}
|
||||
@ -948,7 +958,7 @@ sub collect_one_test_case {
|
||||
if ( $skip_rpl )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No replication tests(--skip-rpl)";
|
||||
$tinfo->{'comment'}= "No replication tests";
|
||||
return $tinfo;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
Reference in New Issue
Block a user