Bug #44871 MTR v1 fails 5.0 uses a socket in $TMP under Windows
Submitted: 14 May 2009 11:06 Modified: 8 Jul 2009 10:48
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:1 OS:Any
Assigned to: Philip Stoev CPU Architecture:Any

[14 May 2009 11:06] Philip Stoev
Description:
MTR has an optimization that places the mysql socket in /tmp if the vardir path is too long. This is required for some UNIX architectures, but causes issues with tests on Windows, since the path is no longer where it is expected to be.

This was fixed in MTRv2 and in 5.1 and later, but has started affecting 5.0 tests in PB2 because PB2 uses longer paths than PB1.

How to repeat:
Run the "connect" test on Windows with a very long path to the mysql-test directory.

Suggested fix:
The fix is to avoid applying the UNIX hack on Windows.

=== modified file 'mysql-test/mysql-test-run.pl'
--- mysql-test/mysql-test-run.pl        2009-03-27 05:19:50 +0000
+++ mysql-test/mysql-test-run.pl        2009-05-14 11:05:21 +0000
@@ -1106,7 +1106,7 @@
   # On some operating systems, there is a limit to the length of a
   # UNIX domain socket's path far below PATH_MAX, so try to avoid long
   # socket path names.
-  $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) >= 70 );
+  $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) >= 70 ) && (! $glob_win32 );

   $master->[0]=
   {
[14 May 2009 11:16] Bjørn Munch
This simple fix looks fine, OK to push.
[14 May 2009 16:19] Philip Stoev
Pushed, tests no longer fail.
[8 Jul 2009 10:48] Philip Stoev
Manually advancing status to Closed.