mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
mysql-test-run.pl, mtr_misc.pl:
Bug#12615: Host name might not resolve, use short host name mysql-test/lib/mtr_misc.pl: Bug#12615: Host name might not resolve, use short host name mysql-test/mysql-test-run.pl: Bug#12615: Host name might not resolve, use short host name
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
use strict;
|
||||
|
||||
sub mtr_full_hostname ();
|
||||
sub mtr_short_hostname ();
|
||||
sub mtr_init_args ($);
|
||||
sub mtr_add_arg ($$);
|
||||
sub mtr_path_exists(@);
|
||||
@ -21,6 +22,7 @@ sub mtr_exe_exists(@);
|
||||
|
||||
# We want the fully qualified host name and hostname() may have returned
|
||||
# only the short name. So we use the resolver to find out.
|
||||
# Note that this might fail on some platforms
|
||||
|
||||
sub mtr_full_hostname () {
|
||||
|
||||
@ -35,6 +37,13 @@ sub mtr_full_hostname () {
|
||||
return $hostname;
|
||||
}
|
||||
|
||||
sub mtr_short_hostname () {
|
||||
|
||||
my $hostname= hostname();
|
||||
$hostname =~ s/\..+$//;
|
||||
return $hostname;
|
||||
}
|
||||
|
||||
# FIXME move to own lib
|
||||
|
||||
sub mtr_init_args ($) {
|
||||
|
@ -414,7 +414,7 @@ sub initial_setup () {
|
||||
$opt_source_dist= 1;
|
||||
}
|
||||
|
||||
$glob_hostname= mtr_full_hostname();
|
||||
$glob_hostname= mtr_short_hostname();
|
||||
|
||||
# 'basedir' is always parent of "mysql-test" directory
|
||||
$glob_mysql_test_dir= cwd();
|
||||
|
Reference in New Issue
Block a user