Skip to content

Commit

Permalink
Merge pull request #1692 from laurynas-biveinis/bug1688161-5.5
Browse files Browse the repository at this point in the history
Bug#25604587 BACKPORT BUG#24947217 TO 5.6 AND 5.7
  • Loading branch information
laurynas-biveinis authored May 4, 2017
2 parents 83efd6e + fdf3766 commit 11f5bbd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4159,7 +4159,13 @@ void do_perl(struct st_command *command)
die("Failed to create temporary file for perl command");
my_close(fd, MYF(0));

str_to_file(temp_file_path, ds_script.str, ds_script.length);
/* Compatibility for Perl 5.24 and newer. */
static DYNAMIC_STRING script;
init_dynamic_string(&script, "push @INC, \".\";\n", 1024, 1024);
dynstr_append_mem(&script, ds_script.str, ds_script.length);

str_to_file(temp_file_path, script.str, script.length);
dynstr_free(&script);

/* Format the "perl <filename>" command */
my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path);
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- cperl -*-

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

push @INC, ".";

require "lib/mtr_process.pl";
require "lib/mtr_io.pl";
require "lib/mtr_gcov.pl";
Expand Down

0 comments on commit 11f5bbd

Please sign in to comment.