Skip to content

Commit 11f5bbd

Browse files
Merge pull request #1692 from laurynas-biveinis/bug1688161-5.5
Bug#25604587 BACKPORT BUG#24947217 TO 5.6 AND 5.7
2 parents 83efd6e + fdf3766 commit 11f5bbd

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

client/mysqltest.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4159,7 +4159,13 @@ void do_perl(struct st_command *command)
41594159
die("Failed to create temporary file for perl command");
41604160
my_close(fd, MYF(0));
41614161

4162-
str_to_file(temp_file_path, ds_script.str, ds_script.length);
4162+
/* Compatibility for Perl 5.24 and newer. */
4163+
static DYNAMIC_STRING script;
4164+
init_dynamic_string(&script, "push @INC, \".\";\n", 1024, 1024);
4165+
dynstr_append_mem(&script, ds_script.str, ds_script.length);
4166+
4167+
str_to_file(temp_file_path, script.str, script.length);
4168+
dynstr_free(&script);
41634169

41644170
/* Format the "perl <filename>" command */
41654171
my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path);

mysql-test/mysql-test-run.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22
# -*- cperl -*-
33

4-
# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
@@ -101,6 +101,8 @@ BEGIN
101101
use IO::Select;
102102
use Subunit;
103103

104+
push @INC, ".";
105+
104106
require "lib/mtr_process.pl";
105107
require "lib/mtr_io.pl";
106108
require "lib/mtr_gcov.pl";

0 commit comments

Comments
 (0)