Skip to content

Commit f5d0490

Browse files
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents 9ea89b3 + 6f8e0f1 commit f5d0490

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

client/mysqltest.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
3535
#include <my_dir.h>
3636
#include <hash.h>
3737
#include <stdarg.h>
38+
#include <string>
3839
#include <violite.h>
3940
#include "my_regex.h" /* Our own version of regex */
4041
#include "my_thread_local.h"
@@ -57,6 +58,7 @@
5758

5859
using std::min;
5960
using std::max;
61+
using std::string;
6062

6163
#ifdef _WIN32
6264
#include <crtdbg.h>
@@ -4426,7 +4428,11 @@ void do_perl(struct st_command *command)
44264428
die("Failed to create temporary file for perl command");
44274429
my_close(fd, MYF(0));
44284430

4429-
str_to_file(temp_file_path, ds_script.str, ds_script.length);
4431+
/* Compatibility for Perl 5.24 and newer. */
4432+
string script = "push @INC, \".\";\n";
4433+
script.append(ds_script.str, ds_script.length);
4434+
4435+
str_to_file(temp_file_path, &script[0], script.size());
44304436

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

mysql-test/mysql-test-run.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ BEGIN
101101
use IO::Socket::INET;
102102
use IO::Select;
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)