diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 0d9626b77e1..1e27f31989f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -6190,7 +6190,8 @@ sub valgrind_arguments { mtr_add_arg($args, "--num-callers=16"); mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) if -f "$glob_mysql_test_dir/valgrind.supp"; - my $temp= `ldd $ENV{MTR_BINDIR}/sql/mysqld | grep 'libjemalloc'`; + my $exe_mysqld= find_mysqld($bindir) || ""; + my $temp= `ldd $exe_mysqld | grep 'libjemalloc'`; if ($temp) { mtr_add_arg($args, "--soname-synonyms=somalloc=libjemalloc*");