Commit 8d24f4e3 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-19821 "perl;" snippet must run the same perl executable that runs mtr.

parent c631bd7f
...@@ -4643,8 +4643,16 @@ void do_perl(struct st_command *command) ...@@ -4643,8 +4643,16 @@ void do_perl(struct st_command *command)
str_to_file(temp_file_path, ds_script.str, ds_script.length); 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 */ /* 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"))) if (!(res_file= my_popen(buf, "r")))
{ {
......
...@@ -366,6 +366,8 @@ main(); ...@@ -366,6 +366,8 @@ main();
sub main { sub main {
$ENV{MTR_PERL}=$^X;
# Default, verbosity on # Default, verbosity on
report_option('verbose', 0); report_option('verbose', 0);
......
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