Fixed lp:902654 "MariaDB consistently crashes in collect_tables on Aria checkpoint execution"
This happend when you have more than 1024 open Aria tables during checkpoint. mysql-test/mysql-test-run.pl: Fixed that variable names are consistent between external and internal server. mysql-test/suite/maria/suite.pm: Test for aria-block-size instead of 'aria' as 'aria' is not set for embedded server. This should be ok for aria tests, as aria is never disabled for these. storage/maria/ma_checkpoint.c: Fixed bug when there are more than 1024 open Aria tables during checkpoint.
This commit is contained in:
parent
c563ea0717
commit
3c07d04580
@ -1758,8 +1758,11 @@ sub collect_mysqld_features {
|
||||
# Put variables into hash
|
||||
if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ )
|
||||
{
|
||||
# print "$1=\"$2\"\n";
|
||||
$mysqld_variables{$1}= $2;
|
||||
my $name= $1;
|
||||
my $value=$2;
|
||||
$name =~ s/_/-/g;
|
||||
# print "$name=\"$value\"\n";
|
||||
$mysqld_variables{$name}= $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1813,8 +1816,11 @@ sub collect_mysqld_features_from_running_server ()
|
||||
# Put variables into hash
|
||||
if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ )
|
||||
{
|
||||
# print "$1=\"$2\"\n";
|
||||
$mysqld_variables{$1}= $2;
|
||||
my $name= $1;
|
||||
my $value=$2;
|
||||
$name =~ s/_/-/g;
|
||||
# print "$name=\"$value\"\n";
|
||||
$mysqld_variables{$name}= $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ package My::Suite::Maria;
|
||||
|
||||
@ISA = qw(My::Suite);
|
||||
|
||||
return "Need Aria engine" unless $::mysqld_variables{'aria'} eq "ON";
|
||||
return "Need Aria engine" unless $::mysqld_variables{'aria-block-size'} > 0;
|
||||
|
||||
bless { };
|
||||
|
||||
|
@ -908,6 +908,9 @@ static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon)
|
||||
*/
|
||||
}
|
||||
translog_unlock();
|
||||
if (state_copy == state_copies)
|
||||
break; /* Nothing to do */
|
||||
|
||||
/**
|
||||
We are going to flush these states.
|
||||
Before, all records describing how to undo such state must be
|
||||
@ -932,13 +935,13 @@ static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon)
|
||||
if (translog_flush(state_copies_horizon))
|
||||
goto err;
|
||||
/* now we have cached states and they are WAL-safe*/
|
||||
state_copies_end= state_copy;
|
||||
state_copies_end= state_copy-1;
|
||||
state_copy= state_copies;
|
||||
}
|
||||
|
||||
/* locate our state among these cached ones */
|
||||
for ( ; state_copy->index != i; state_copy++)
|
||||
DBUG_ASSERT(state_copy < state_copies_end);
|
||||
DBUG_ASSERT(state_copy <= state_copies_end);
|
||||
|
||||
/* OS file descriptors are ints which we stored in 4 bytes */
|
||||
compile_time_assert(sizeof(int) <= 4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user