Commit b8ba8b60 authored by unknown's avatar unknown

Move the check for socket path truncation to after the tmpdir has been created

since it's used by the check
parent 36154f24
......@@ -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=<path> 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=<path> 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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment