Return empty string if file does not exist

Set LD_LIBRARY_PATH and UDF_EXAMPLE_LIB from $lib_udf_example
parent e5004d13
...@@ -100,14 +100,7 @@ sub mtr_file_exists (@) { ...@@ -100,14 +100,7 @@ sub mtr_file_exists (@) {
{ {
return $path if -e $path; return $path if -e $path;
} }
if ( @_ == 1 ) return "";
{
mtr_error("Could not find $_[0]");
}
else
{
mtr_error("Could not find any of " . join(" ", @_));
}
} }
sub mtr_exe_exists (@) { sub mtr_exe_exists (@) {
......
...@@ -1150,7 +1150,7 @@ sub environment_setup () { ...@@ -1150,7 +1150,7 @@ sub environment_setup () {
# Add the path where mysqld will find udf_example.so # Add the path where mysqld will find udf_example.so
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
$ENV{'LD_LIBRARY_PATH'}= $ENV{'LD_LIBRARY_PATH'}=
"$glob_basedir/sql/.libs" . ($lib_udf_example ? dirname($lib_udf_example) : "") .
($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : "");
...@@ -2956,7 +2956,8 @@ sub run_mysqltest ($) { ...@@ -2956,7 +2956,8 @@ sub run_mysqltest ($) {
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test; $ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
$ENV{'CHARSETSDIR'}= $path_charsetsdir; $ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults; $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
$ENV{'UDF_EXAMPLE_LIB'}= basename($lib_udf_example); $ENV{'UDF_EXAMPLE_LIB'}=
($lib_udf_example ? basename($lib_udf_example) : "");
$ENV{'NDB_MGM'}= $exe_ndb_mgm; $ENV{'NDB_MGM'}= $exe_ndb_mgm;
$ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir; $ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir;
......
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