mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -45,14 +45,13 @@
|
|||||||
|
|
||||||
perl;
|
perl;
|
||||||
use strict;
|
use strict;
|
||||||
use autodie qw(open);
|
|
||||||
die "SEARCH_FILE not set" unless $ENV{SEARCH_FILE};
|
die "SEARCH_FILE not set" unless $ENV{SEARCH_FILE};
|
||||||
my @search_files= glob($ENV{SEARCH_FILE});
|
my @search_files= glob($ENV{SEARCH_FILE});
|
||||||
my $search_pattern= $ENV{SEARCH_PATTERN} or die "SEARCH_PATTERN not set";
|
my $search_pattern= $ENV{SEARCH_PATTERN} or die "SEARCH_PATTERN not set";
|
||||||
my $search_range= $ENV{SEARCH_RANGE};
|
my $search_range= $ENV{SEARCH_RANGE};
|
||||||
my $content;
|
my $content;
|
||||||
foreach my $search_file (@search_files) {
|
foreach my $search_file (@search_files) {
|
||||||
open(FILE, '<', $search_file);
|
open(FILE, '<', $search_file) || die("Can't open file $search_file: $!");
|
||||||
my $file_content;
|
my $file_content;
|
||||||
if ($search_range > 0) {
|
if ($search_range > 0) {
|
||||||
read(FILE, $file_content, $search_range, 0);
|
read(FILE, $file_content, $search_range, 0);
|
||||||
|
@ -39,7 +39,6 @@ let $wait_condition = select count(*) = 0
|
|||||||
|
|
||||||
let NO_MORE_DELETES=$no_more_deletes;
|
let NO_MORE_DELETES=$no_more_deletes;
|
||||||
perl;
|
perl;
|
||||||
use autodie qw(open);
|
|
||||||
$num_retries=240;
|
$num_retries=240;
|
||||||
$retry=0;
|
$retry=0;
|
||||||
print "wait_for_delete: $ENV{no_more_deletes}\n";
|
print "wait_for_delete: $ENV{no_more_deletes}\n";
|
||||||
@ -47,7 +46,8 @@ perl;
|
|||||||
$total_d=$total_e=0;
|
$total_d=$total_e=0;
|
||||||
for $f (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>) {
|
for $f (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>) {
|
||||||
# excluding system cf
|
# excluding system cf
|
||||||
open D, '-|', "$ENV{MARIAROCKS_SST_DUMP} --command=scan --output_hex --file=$f";
|
$filename= "$ENV{MARIAROCKS_SST_DUMP} --command=scan --output_hex --file=$f";
|
||||||
|
open(D, '-|', $filename) || die("Can't open file $filename: $!");
|
||||||
while (<D>) {
|
while (<D>) {
|
||||||
next unless /'(\d{8})/ and $1 >= 8;
|
next unless /'(\d{8})/ and $1 >= 8;
|
||||||
$total_d++ if /: [07]/;
|
$total_d++ if /: [07]/;
|
||||||
|
@ -111,7 +111,6 @@ let $wait_condition = select count(*) = 0
|
|||||||
# Check total compacted-away rows for all indices
|
# Check total compacted-away rows for all indices
|
||||||
# Check that all indices have been successfully dropped
|
# Check that all indices have been successfully dropped
|
||||||
perl;
|
perl;
|
||||||
use autodie qw(open);
|
|
||||||
|
|
||||||
sub print_array {
|
sub print_array {
|
||||||
$str = shift;
|
$str = shift;
|
||||||
@ -123,7 +122,8 @@ sub print_array {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open F, '<', "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err";
|
$filename= "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err";
|
||||||
|
open(F, '<', $filename) || die("Can't open file $filename: $!");
|
||||||
while (<F>) {
|
while (<F>) {
|
||||||
%a = @b = @c = () if /CURRENT_TEST/;
|
%a = @b = @c = () if /CURRENT_TEST/;
|
||||||
if (/Compacting away elements from dropped index \(\d+,(\d+)\): (\d+)/) {
|
if (/Compacting away elements from dropped index \(\d+,(\d+)\): (\d+)/) {
|
||||||
|
@ -90,9 +90,9 @@ let $table = t5;
|
|||||||
--source drop_table_repopulate_table.inc
|
--source drop_table_repopulate_table.inc
|
||||||
|
|
||||||
perl;
|
perl;
|
||||||
use autodie qw(open);
|
|
||||||
$size+=-s $_ for (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>);
|
$size+=-s $_ for (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>);
|
||||||
open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/size_output");
|
$filename= "$ENV{MYSQLTEST_VARDIR}/tmp/size_output";
|
||||||
|
open(F, '>', $filename) || die("Can't open file $filename: $!");
|
||||||
print F $size;
|
print F $size;
|
||||||
EOF
|
EOF
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@ -110,9 +110,9 @@ let $wait_condition = select count(*) = 0
|
|||||||
|
|
||||||
# Check that space is reclaimed
|
# Check that space is reclaimed
|
||||||
perl;
|
perl;
|
||||||
use autodie qw(open);
|
|
||||||
$size+=-s $_ for (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>);
|
$size+=-s $_ for (<$ENV{MYSQLTEST_VARDIR}/mysqld.1/data/.rocksdb/*.sst>);
|
||||||
open(F, '<', "$ENV{MYSQLTEST_VARDIR}/tmp/size_output");
|
$filename= "$ENV{MYSQLTEST_VARDIR}/tmp/size_output";
|
||||||
|
open(F, '<', $filename) || die("Can't open file $filename: $!");
|
||||||
$old=<F>;
|
$old=<F>;
|
||||||
print "Compacted\n" if $old > $size * 2;
|
print "Compacted\n" if $old > $size * 2;
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
# run a check script to verify sst files reduced enough during each optimize table
|
# run a check script to verify sst files reduced enough during each optimize table
|
||||||
perl;
|
perl;
|
||||||
use autodie qw(open);
|
|
||||||
|
|
||||||
$size += -s $_ for (<$ENV{datadir}/.rocksdb/*.sst>);
|
$size += -s $_ for (<$ENV{datadir}/.rocksdb/*.sst>);
|
||||||
$file= "$ENV{MYSQL_TMP_DIR}/sst_size.dat";
|
$file= "$ENV{MYSQL_TMP_DIR}/sst_size.dat";
|
||||||
|
|
||||||
if (-f $file) {
|
if (-f $file) {
|
||||||
open(F, '<', $file);
|
open(F, '<', $file) || die("Can't open file $file: $!");
|
||||||
$old = <F>;
|
$old = <F>;
|
||||||
close F;
|
close F;
|
||||||
if ($old - $size < 1e6) {
|
if ($old - $size < 1e6) {
|
||||||
@ -15,7 +14,7 @@ if (-f $file) {
|
|||||||
print "sst file reduction ok\n";
|
print "sst file reduction ok\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open(F, '>', $file);
|
open(F, '>', $file) || die("Can't open file $file: $!");
|
||||||
print F $size;
|
print F $size;
|
||||||
close F;
|
close F;
|
||||||
EOF
|
EOF
|
||||||
|
@ -53,12 +53,12 @@ while ($i<10000)
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
check table t4;
|
check table t4;
|
||||||
perl;
|
perl;
|
||||||
use autodie qw(open);
|
|
||||||
$total=10000;
|
$total=10000;
|
||||||
$pct=5;
|
$pct=5;
|
||||||
@out=();
|
@out=();
|
||||||
|
|
||||||
open(F, '<', "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err");
|
$filename= "$ENV{MYSQLTEST_VARDIR}/log/mysqld.1.err";
|
||||||
|
open(F, '<', $filename) || die("Can't open file $filename: $!");
|
||||||
while(<F>) {
|
while(<F>) {
|
||||||
@out=() if /^CURRENT_TEST:/;
|
@out=() if /^CURRENT_TEST:/;
|
||||||
if (/(\d+) index entries checked \((\d+) had checksums/) {
|
if (/(\d+) index entries checked \((\d+) had checksums/) {
|
||||||
|
Reference in New Issue
Block a user