diff options
author | unknown <kent@mysql.com> | 2005-08-17 14:40:23 +0200 |
---|---|---|
committer | unknown <kent@mysql.com> | 2005-08-17 14:40:23 +0200 |
commit | a80110f7f2c9ecd04f83033c5dc2f66268441711 (patch) | |
tree | fc3d2602c365dcc253537e8ea15264b31232f47f /mysql-test/lib | |
parent | 99cf8c38e0840f113988b9c131bfb04c864ffc42 (diff) | |
download | mariadb-git-a80110f7f2c9ecd04f83033c5dc2f66268441711.tar.gz |
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
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_misc.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl index c1aab340a16..9a12d842998 100644 --- a/mysql-test/lib/mtr_misc.pl +++ b/mysql-test/lib/mtr_misc.pl @@ -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 ($) { |