Commit c51ca133 authored by unknown's avatar unknown

Generate a unique tmpdir for each server to avoid that they delete each others

temporary files at start up - see 'mysql_rm_tmp_tables'


mysql-test/mysql-test-run.pl:
  Create the servers tempdir before starting
parent e70c2910
...@@ -104,10 +104,16 @@ sub fix_server_id { ...@@ -104,10 +104,16 @@ sub fix_server_id {
sub fix_socket { sub fix_socket {
my ($self, $config, $group_name, $group)= @_; my ($self, $config, $group_name, $group)= @_;
# Put socket file in tmpdir # Put socket file in tmpdir
my $dir= $group->value('tmpdir'); my $dir= $self->{ARGS}->{tmpdir};
return "$dir/$group_name.sock"; return "$dir/$group_name.sock";
} }
sub fix_tmpdir {
my ($self, $config, $group_name, $group)= @_;
my $dir= $self->{ARGS}->{tmpdir};
return "$dir/$group_name";
}
sub fix_log_error { sub fix_log_error {
my ($self, $config, $group_name, $group)= @_; my ($self, $config, $group_name, $group)= @_;
my $dir= dirname($group->value('datadir')); my $dir= dirname($group->value('datadir'));
...@@ -182,7 +188,7 @@ sub fix_ssl_client_key { ...@@ -182,7 +188,7 @@ sub fix_ssl_client_key {
my @mysqld_rules= my @mysqld_rules=
( (
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } }, { 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
{ 'tmpdir' => sub { return shift->{ARGS}->{tmpdir}; } }, { 'tmpdir' => \&fix_tmpdir },
{ 'character-sets-dir' => \&fix_charset_dir }, { 'character-sets-dir' => \&fix_charset_dir },
{ 'language' => \&fix_language }, { 'language' => \&fix_language },
{ 'datadir' => \&fix_datadir }, { 'datadir' => \&fix_datadir },
......
...@@ -3816,6 +3816,10 @@ sub start_servers($) { ...@@ -3816,6 +3816,10 @@ sub start_servers($) {
mtr_error("Failed to copy system db to '$datadir'") mtr_error("Failed to copy system db to '$datadir'")
unless -d $datadir; unless -d $datadir;
# Create the servers tmpdir
my $tmpdir= $mysqld->value('tmpdir');
mkpath($tmpdir) unless -d $tmpdir;
# Write start of testcase to log file # Write start of testcase to log file
mark_log($mysqld->value('log-error'), $tinfo); mark_log($mysqld->value('log-error'), $tinfo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment