Skip to content

Commit 20d9fbc

Browse files
committed
MDEV-12424: binlog_encryption.encrypted_* tests fail with Can't locate autodie.pm error
Don't use Perl autodie module as there are platforms where it is not present
1 parent 74889de commit 20d9fbc

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

mysql-test/include/search_pattern_in_file.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@
4545

4646
perl;
4747
use strict;
48-
use autodie qw(open);
4948
die "SEARCH_FILE not set" unless $ENV{SEARCH_FILE};
5049
my @search_files= glob($ENV{SEARCH_FILE});
5150
my $search_pattern= $ENV{SEARCH_PATTERN} or die "SEARCH_PATTERN not set";
5251
my $search_range= $ENV{SEARCH_RANGE};
5352
my $content;
5453
foreach my $search_file (@search_files) {
55-
open(FILE, '<', $search_file);
54+
open(FILE, '<', $search_file) || die("Can't open file $search_file: $!");
5655
my $file_content;
5756
if ($search_range > 0) {
5857
read(FILE, $file_content, $search_range, 0);

storage/rocksdb/mysql-test/rocksdb/t/compact_deletes_test.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ let $wait_condition = select count(*) = 0
3939

4040
let NO_MORE_DELETES=$no_more_deletes;
4141
perl;
42-
use autodie qw(open);
4342
$num_retries=240;
4443
$retry=0;
4544
print "wait_for_delete: $ENV{no_more_deletes}\n";
4645
while ($retry++ < $num_retries) {
4746
$total_d=$total_e=0;
4847
for $f (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>) {
4948
# excluding system cf
50-
open D, '-|', "$ENV{MARIAROCKS_SST_DUMP} --command=scan --output_hex --file=$f";
49+
$filename= "$ENV{MARIAROCKS_SST_DUMP} --command=scan --output_hex --file=$f";
50+
open(D, '-|', $filename) || die("Can't open file $filename: $!");
5151
while (<D>) {
5252
next unless /'(\d{8})/ and $1 >= 8;
5353
$total_d++ if /: [07]/;

storage/rocksdb/mysql-test/rocksdb/t/drop_table.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ let $wait_condition = select count(*) = 0
111111
# Check total compacted-away rows for all indices
112112
# Check that all indices have been successfully dropped
113113
perl;
114-
use autodie qw(open);
115114

116115
sub print_array {
117116
$str = shift;
@@ -123,7 +122,8 @@ sub print_array {
123122
}
124123
}
125124

126-
open F, '<', "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err";
125+
$filename= "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err";
126+
open(F, '<', $filename) || die("Can't open file $filename: $!");
127127
while (<F>) {
128128
%a = @b = @c = () if /CURRENT_TEST/;
129129
if (/Compacting away elements from dropped index \(\d+,(\d+)\): (\d+)/) {

storage/rocksdb/mysql-test/rocksdb/t/drop_table2.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ let $table = t5;
9090
--source drop_table_repopulate_table.inc
9191

9292
perl;
93-
use autodie qw(open);
9493
$size+=-s $_ for (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>);
95-
open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/size_output");
94+
$filename= "$ENV{MYSQLTEST_VARDIR}/tmp/size_output";
95+
open(F, '>', $filename) || die("Can't open file $filename: $!");
9696
print F $size;
9797
EOF
9898
drop table t1;
@@ -110,9 +110,9 @@ let $wait_condition = select count(*) = 0
110110

111111
# Check that space is reclaimed
112112
perl;
113-
use autodie qw(open);
114113
$size+=-s $_ for (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>);
115-
open(F, '<', "$ENV{MYSQLTEST_VARDIR}/tmp/size_output");
114+
$filename= "$ENV{MYSQLTEST_VARDIR}/tmp/size_output";
115+
open(F, '<', $filename) || die("Can't open file $filename: $!");
116116
$old=<F>;
117117
print "Compacted\n" if $old > $size * 2;
118118
EOF
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# run a check script to verify sst files reduced enough during each optimize table
22
perl;
3-
use autodie qw(open);
43

54
$size += -s $_ for (<$ENV{datadir}/.rocksdb/*.sst>);
65
$file= "$ENV{MYSQL_TMP_DIR}/sst_size.dat";
76
87
if (-f $file) {
9-
open(F, '<', $file);
8+
open(F, '<', $file) || die("Can't open file $file: $!");
109
$old = <F>;
1110
close F;
1211
if ($old - $size < 1e6) {
@@ -15,7 +14,7 @@ if (-f $file) {
1514
print "sst file reduction ok\n";
1615
}
1716
}
18-
open(F, '>', $file);
17+
open(F, '>', $file) || die("Can't open file $file: $!");
1918
print F $size;
2019
close F;
2120
EOF

storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ while ($i<10000)
5353
--enable_query_log
5454
check table t4;
5555
perl;
56-
use autodie qw(open);
5756
$total=10000;
5857
$pct=5;
5958
@out=();
6059

61-
open(F, '<', "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err");
60+
$filename= "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err";
61+
open(F, '<', $filename) || die("Can't open file $filename: $!");
6262
while(<F>) {
6363
@out=() if /^CURRENT_TEST:/;
6464
if (/(\d+) index entries checked \((\d+) had checksums/) {

0 commit comments

Comments
 (0)