1 |
commit: 3b2b8ea223d5dea9954adc01f0a4129925e4cc27 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 18 19:47:58 2017 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 18 19:47:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=3b2b8ea2 |
7 |
|
8 |
Rebase Perl test patch on what MariaDB did |
9 |
|
10 |
20027_all_mysql-5.5-perl5.26-includes.patch | 79 +++++++++++++++++++++++------ |
11 |
1 file changed, 64 insertions(+), 15 deletions(-) |
12 |
|
13 |
diff --git a/20027_all_mysql-5.5-perl5.26-includes.patch b/20027_all_mysql-5.5-perl5.26-includes.patch |
14 |
index f1e02cc..9e3479e 100644 |
15 |
--- a/20027_all_mysql-5.5-perl5.26-includes.patch |
16 |
+++ b/20027_all_mysql-5.5-perl5.26-includes.patch |
17 |
@@ -1,15 +1,64 @@ |
18 |
-diff -aurN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl |
19 |
---- a/mysql-test/mysql-test-run.pl 2017-09-13 11:20:41.000000000 -0400 |
20 |
-+++ b/mysql-test/mysql-test-run.pl 2017-10-18 09:04:10.470550268 -0400 |
21 |
-@@ -75,7 +75,7 @@ |
22 |
- } |
23 |
- } |
24 |
+Based on MariaDB commit: |
25 |
+ |
26 |
+From d185f1d68bb1f37bea10d8ac6188e5a04faf4522 Mon Sep 17 00:00:00 2001 |
27 |
+From: Oleksandr Byelkin <sanja@×××××××.com> |
28 |
+Date: Wed, 19 Apr 2017 14:30:52 +0200 |
29 |
+Subject: [PATCH] Fix use of `require` in mysql-test-run. |
30 |
+ |
31 |
+The motivation for this is that Perl is moving towards not having |
32 |
+current directory ./ in @INC by default. This is causing |
33 |
+mysql-test-run.pl to fail in latest Debian Unstable: |
34 |
+ |
35 |
+ https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html |
36 |
+ |
37 |
+However, we have `use "lib"`, there is no need for current directory |
38 |
+in @INC, except for a gross hack. In mtr_cases.pm, there is a |
39 |
+`require "mtr_misc.pl"`, which hides mtr_misc.pl away in mtr_cases |
40 |
+namespace. And things only work because mysql-test-run.pl loads it |
41 |
+with a different name, `require "lib/mtr_misc.pl"`! (Perl will |
42 |
+`require` only once for each unique filename). |
43 |
+ |
44 |
+Fix this by only using `require` in main program, and referencing |
45 |
+functions with :: scope from other namespaces. For multi-use in |
46 |
+different namespaces, proper `use` modules should be used. |
47 |
+ |
48 |
+Signed-off-by: Kristian Nielsen <knielsen@×××××××××××.org> |
49 |
+ |
50 |
+diff -aurN a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm |
51 |
+--- a/mysql-test/lib/mtr_cases.pm 2017-09-13 11:20:41.000000000 -0400 |
52 |
++++ b/mysql-test/lib/mtr_cases.pm 2017-10-18 13:26:23.071250558 -0400 |
53 |
+@@ -68,8 +68,6 @@ |
54 |
+ use My::Test; |
55 |
+ use My::Find; |
56 |
|
57 |
--use lib "lib"; |
58 |
-+use lib "./lib"; |
59 |
+-require "mtr_misc.pl"; |
60 |
+- |
61 |
+ # Precompiled regex's for tests to do or skip |
62 |
+ my $do_test_reg; |
63 |
+ my $skip_test_reg; |
64 |
+diff -aurN a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm |
65 |
+--- a/mysql-test/lib/mtr_report.pm 2017-09-13 11:20:41.000000000 -0400 |
66 |
++++ b/mysql-test/lib/mtr_report.pm 2017-10-18 13:23:22.589301656 -0400 |
67 |
+@@ -33,7 +33,6 @@ |
68 |
+ use My::Platform; |
69 |
+ use POSIX qw[ _exit ]; |
70 |
+ use IO::Handle qw[ flush ]; |
71 |
+-require "mtr_io.pl"; |
72 |
+ use mtr_results; |
73 |
|
74 |
- use Cwd; |
75 |
- use Getopt::Long; |
76 |
+ my $tot_real_time= 0; |
77 |
+@@ -95,7 +94,7 @@ |
78 |
+ my $timer_str= ""; |
79 |
+ if ( $timer and -f "$::opt_vardir/log/timer" ) |
80 |
+ { |
81 |
+- $timer_str= mtr_fromfile("$::opt_vardir/log/timer"); |
82 |
++ $timer_str= ::mtr_fromfile("$::opt_vardir/log/timer"); |
83 |
+ $tinfo->{timer}= $timer_str; |
84 |
+ resfile_test_info('duration', $timer_str) if $::opt_resfile; |
85 |
+ } |
86 |
+diff -aurN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl |
87 |
+--- a/mysql-test/mysql-test-run.pl 2017-09-13 11:20:41.000000000 -0400 |
88 |
++++ b/mysql-test/mysql-test-run.pl 2017-10-18 13:22:05.012314793 -0400 |
89 |
@@ -100,11 +100,11 @@ |
90 |
use IO::Socket::INET; |
91 |
use IO::Select; |
92 |
@@ -19,11 +68,11 @@ diff -aurN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl |
93 |
-require "lib/mtr_gcov.pl"; |
94 |
-require "lib/mtr_gprof.pl"; |
95 |
-require "lib/mtr_misc.pl"; |
96 |
-+require "./lib/mtr_process.pl"; |
97 |
-+require "./lib/mtr_io.pl"; |
98 |
-+require "./lib/mtr_gcov.pl"; |
99 |
-+require "./lib/mtr_gprof.pl"; |
100 |
-+require "./lib/mtr_misc.pl"; |
101 |
++require "mtr_process.pl"; |
102 |
++require "mtr_io.pl"; |
103 |
++require "mtr_gcov.pl"; |
104 |
++require "mtr_gprof.pl"; |
105 |
++require "mtr_misc.pl"; |
106 |
|
107 |
$SIG{INT}= sub { mtr_error("Got ^C signal"); }; |