From fd47c80e6d5eb6a4a8ffc864715881c94f896ebd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Apr 2008 23:12:28 +0200 Subject: [PATCH] Move the check for socket path truncation to after the tmpdir has been created since it's used by the check --- mysql-test/mysql-test-run.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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");