diff options
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 0d8739a4613..0cf356c6061 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1320,30 +1320,34 @@ sub executable_setup () { sub environment_setup () { + my $extra_ld_library_paths; umask(022); # -------------------------------------------------------------------------- - # We might not use a standard installation directory, like /usr/lib. - # Set LD_LIBRARY_PATH to make sure we find our installed libraries. + # Setup LD_LIBRARY_PATH so the libraries from this distro/clone + # are used in favor of the system installed ones # -------------------------------------------------------------------------- - - unless ( $opt_source_dist ) + if ( $opt_source_dist ) { - $ENV{'LD_LIBRARY_PATH'}= - "$glob_basedir/lib" . - ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); - $ENV{'DYLD_LIBRARY_PATH'}= - "$glob_basedir/lib" . - ($ENV{'DYLD_LIBRARY_PATH'} ? ":$ENV{'DYLD_LIBRARY_PATH'}" : ""); + $extra_ld_library_paths= "$glob_basedir/libmysql/.libs/"; + } + else + { + $extra_ld_library_paths= "$glob_basedir/lib"; } # -------------------------------------------------------------------------- # Add the path where mysqld will find udf_example.so # -------------------------------------------------------------------------- + $extra_ld_library_paths .= ":" . + ($lib_udf_example ? dirname($lib_udf_example) : ""); + $ENV{'LD_LIBRARY_PATH'}= - ($lib_udf_example ? dirname($lib_udf_example) : "") . + "$extra_ld_library_paths" . ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); - + $ENV{'DYLD_LIBRARY_PATH'}= + "$extra_ld_library_paths" . + ($ENV{'DYLD_LIBRARY_PATH'} ? ":$ENV{'DYLD_LIBRARY_PATH'}" : ""); # -------------------------------------------------------------------------- # Also command lines in .opt files may contain env vars |