diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-06-21 12:02:40 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-06-21 12:02:40 +0200 |
commit | 8d24f4e35d466cc70322b0593ba02d850a394826 (patch) | |
tree | 81608c543bfa6e4dfa74f9ca515685a12460973d /client | |
parent | c631bd7f1099b7f60b319c3c6093869116bed2d2 (diff) | |
download | mariadb-git-8d24f4e35d466cc70322b0593ba02d850a394826.tar.gz |
MDEV-19821 "perl;" snippet must run the same perl executable that runs mtr.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 16c0f684c0b..7c46bd194c5 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -4643,8 +4643,16 @@ void do_perl(struct st_command *command) str_to_file(temp_file_path, ds_script.str, ds_script.length); + /* Use the same perl executable as the one that runs mysql-test-run.pl */ + const char *mtr_perl=getenv("MTR_PERL"); + if (!mtr_perl) + mtr_perl="perl"; + /* Format the "perl <filename>" command */ - my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path); + if (strchr(mtr_perl, ' ')) + my_snprintf(buf, sizeof(buf), "\"%s\" %s", mtr_perl, temp_file_path); + else + my_snprintf(buf, sizeof(buf), "%s %s", mtr_perl, temp_file_path); if (!(res_file= my_popen(buf, "r"))) { |