diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 69bb969d7b8..824267c8cc0 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -104,10 +104,16 @@ sub fix_server_id { sub fix_socket { my ($self, $config, $group_name, $group)= @_; # Put socket file in tmpdir - my $dir= $group->value('tmpdir'); + my $dir= $self->{ARGS}->{tmpdir}; 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 { my ($self, $config, $group_name, $group)= @_; my $dir= dirname($group->value('datadir')); @@ -182,7 +188,7 @@ sub fix_ssl_client_key { my @mysqld_rules= ( { 'basedir' => sub { return shift->{ARGS}->{basedir}; } }, - { 'tmpdir' => sub { return shift->{ARGS}->{tmpdir}; } }, + { 'tmpdir' => \&fix_tmpdir }, { 'character-sets-dir' => \&fix_charset_dir }, { 'language' => \&fix_language }, { 'datadir' => \&fix_datadir }, diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index d3febb6a5c1..3e186b5ec46 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3816,6 +3816,10 @@ sub start_servers($) { mtr_error("Failed to copy system db to '$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 mark_log($mysqld->value('log-error'), $tinfo);