diff options
author | 2017-10-18 15:47:58 -0400 | |
---|---|---|
committer | 2017-10-18 15:47:58 -0400 | |
commit | 3b2b8ea223d5dea9954adc01f0a4129925e4cc27 (patch) | |
tree | 67c0b9fad8f72d604f177afc77a11687b66823c2 /20027_all_mysql-5.5-perl5.26-includes.patch | |
parent | Update index for last patch (diff) | |
download | mysql-extras-3b2b8ea223d5dea9954adc01f0a4129925e4cc27.tar.gz mysql-extras-3b2b8ea223d5dea9954adc01f0a4129925e4cc27.tar.bz2 mysql-extras-3b2b8ea223d5dea9954adc01f0a4129925e4cc27.zip |
Rebase Perl test patch on what MariaDB didmysql-extras-20171018-1948Z
Diffstat (limited to '20027_all_mysql-5.5-perl5.26-includes.patch')
-rw-r--r-- | 20027_all_mysql-5.5-perl5.26-includes.patch | 79 |
1 files changed, 64 insertions, 15 deletions
diff --git a/20027_all_mysql-5.5-perl5.26-includes.patch b/20027_all_mysql-5.5-perl5.26-includes.patch index f1e02cc..9e3479e 100644 --- a/20027_all_mysql-5.5-perl5.26-includes.patch +++ b/20027_all_mysql-5.5-perl5.26-includes.patch @@ -1,15 +1,64 @@ -diff -aurN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl ---- a/mysql-test/mysql-test-run.pl 2017-09-13 11:20:41.000000000 -0400 -+++ b/mysql-test/mysql-test-run.pl 2017-10-18 09:04:10.470550268 -0400 -@@ -75,7 +75,7 @@ - } - } +Based on MariaDB commit: + +From d185f1d68bb1f37bea10d8ac6188e5a04faf4522 Mon Sep 17 00:00:00 2001 +From: Oleksandr Byelkin <sanja@mariadb.com> +Date: Wed, 19 Apr 2017 14:30:52 +0200 +Subject: [PATCH] Fix use of `require` in mysql-test-run. + +The motivation for this is that Perl is moving towards not having +current directory ./ in @INC by default. This is causing +mysql-test-run.pl to fail in latest Debian Unstable: + + https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html + +However, we have `use "lib"`, there is no need for current directory +in @INC, except for a gross hack. In mtr_cases.pm, there is a +`require "mtr_misc.pl"`, which hides mtr_misc.pl away in mtr_cases +namespace. And things only work because mysql-test-run.pl loads it +with a different name, `require "lib/mtr_misc.pl"`! (Perl will +`require` only once for each unique filename). + +Fix this by only using `require` in main program, and referencing +functions with :: scope from other namespaces. For multi-use in +different namespaces, proper `use` modules should be used. + +Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org> + +diff -aurN a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm +--- a/mysql-test/lib/mtr_cases.pm 2017-09-13 11:20:41.000000000 -0400 ++++ b/mysql-test/lib/mtr_cases.pm 2017-10-18 13:26:23.071250558 -0400 +@@ -68,8 +68,6 @@ + use My::Test; + use My::Find; --use lib "lib"; -+use lib "./lib"; +-require "mtr_misc.pl"; +- + # Precompiled regex's for tests to do or skip + my $do_test_reg; + my $skip_test_reg; +diff -aurN a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm +--- a/mysql-test/lib/mtr_report.pm 2017-09-13 11:20:41.000000000 -0400 ++++ b/mysql-test/lib/mtr_report.pm 2017-10-18 13:23:22.589301656 -0400 +@@ -33,7 +33,6 @@ + use My::Platform; + use POSIX qw[ _exit ]; + use IO::Handle qw[ flush ]; +-require "mtr_io.pl"; + use mtr_results; - use Cwd; - use Getopt::Long; + my $tot_real_time= 0; +@@ -95,7 +94,7 @@ + my $timer_str= ""; + if ( $timer and -f "$::opt_vardir/log/timer" ) + { +- $timer_str= mtr_fromfile("$::opt_vardir/log/timer"); ++ $timer_str= ::mtr_fromfile("$::opt_vardir/log/timer"); + $tinfo->{timer}= $timer_str; + resfile_test_info('duration', $timer_str) if $::opt_resfile; + } +diff -aurN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl +--- a/mysql-test/mysql-test-run.pl 2017-09-13 11:20:41.000000000 -0400 ++++ b/mysql-test/mysql-test-run.pl 2017-10-18 13:22:05.012314793 -0400 @@ -100,11 +100,11 @@ use IO::Socket::INET; use IO::Select; @@ -19,11 +68,11 @@ diff -aurN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl -require "lib/mtr_gcov.pl"; -require "lib/mtr_gprof.pl"; -require "lib/mtr_misc.pl"; -+require "./lib/mtr_process.pl"; -+require "./lib/mtr_io.pl"; -+require "./lib/mtr_gcov.pl"; -+require "./lib/mtr_gprof.pl"; -+require "./lib/mtr_misc.pl"; ++require "mtr_process.pl"; ++require "mtr_io.pl"; ++require "mtr_gcov.pl"; ++require "mtr_gprof.pl"; ++require "mtr_misc.pl"; $SIG{INT}= sub { mtr_error("Got ^C signal"); }; |