Move the check for socket path truncation to after the tmpdir has been created
since it's used by the check
This commit is contained in:
parent
dca696e141
commit
fd47c80e6d
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user