diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 41a5bda17aa..0eaafbafb1f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -606,15 +606,6 @@ sub command_line_setup { $opt_tmpdir= "$opt_vardir/tmp" unless $opt_tmpdir; $opt_tmpdir =~ s,/+$,,; # Remove ending slash if any - # On some operating systems, there is a limit to the length of a - # UNIX domain socket's path far below PATH_MAX. - # Don't allow that to happen - if (check_socket_path_length("$opt_tmpdir/testsocket.sock")){ - mtr_error("Socket path '$opt_tmpdir' too long, it would be ", - "truncated and thus not possible to use for connection to ", - "MySQL Server. Set a shorter with --tmpdir= option"); - } - # -------------------------------------------------------------------------- # fast option # -------------------------------------------------------------------------- @@ -1440,6 +1431,15 @@ sub setup_vardir() { symlink($opt_tmpdir, "$opt_vardir/tmp"); } + # On some operating systems, there is a limit to the length of a + # UNIX domain socket's path far below PATH_MAX. + # Don't allow that to happen + if (check_socket_path_length("$opt_tmpdir/testsocket.sock")){ + mtr_error("Socket path '$opt_tmpdir' too long, it would be ", + "truncated and thus not possible to use for connection to ", + "MySQL Server. Set a shorter with --tmpdir= option"); + } + # copy all files from std_data into var/std_data # and make them writable copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data");