diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-02-09 13:10:34 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-02-09 13:10:34 +0100 |
commit | 461cad77b4e068ecc2534150170a029e6f425407 (patch) | |
tree | 5911342b57b343e7b2fe82ea1b796baa6094c1bc | |
parent | 3ba87c370005437656bbcafb0b9ee75527342752 (diff) | |
download | mariadb-git-461cad77b4e068ecc2534150170a029e6f425407.tar.gz |
Bug#42427 : MTR v2 fails with "can't write to /tmp/mysql-test-ports.sem" on Windows
- /tmp directory is not guaranteed to exist on Windows.
Use the value of environment variable TEMP here
-rw-r--r-- | mysql-test/lib/mtr_unique.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_unique.pm b/mysql-test/lib/mtr_unique.pm index b4093ab1dce..2ac172883a2 100644 --- a/mysql-test/lib/mtr_unique.pm +++ b/mysql-test/lib/mtr_unique.pm @@ -28,7 +28,17 @@ sub msg { # print "### unique($$) - ", join(" ", @_), "\n"; } -my $file= "/tmp/mysql-test-ports"; +my $file; + +if(!IS_WINDOWS) +{ + $file= "/tmp/mysql-test-ports"; +} +else +{ + $file= $ENV{'TEMP'}."/mysql-test-ports"; +} + my %mtr_unique_ids; |