Skip to content

Commit 5fb2c03

Browse files
committed
Merge 10.11 into 11.0
2 parents cb9d97e + 56bcb2b commit 5fb2c03

File tree

140 files changed

+3865
-1718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3865
-1718
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
This file was deleted.

cmake/cpack_rpm.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ ELSEIF(RPM MATCHES "sles")
316316
ENDIF()
317317

318318
# MDEV-24629, we need it outside of ELSIFs
319-
IF(RPM MATCHES "fedora3[234]")
319+
IF(RPM MATCHES "fedora")
320320
ALTERNATIVE_NAME("common" "mariadb-connector-c-config" ${MARIADB_CONNECTOR_C_VERSION}-1)
321321
ENDIF()
322322

debian/additions/innotop/innotop

100644100755
Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
# Street, Fifth Floor, Boston, MA 02110-1335 USA
2121

2222
use strict;
23+
use warnings;
24+
use utf8;
25+
use feature ':5.16';
2326
use warnings FATAL => 'all';
2427

2528
our $VERSION = '1.11.4';
@@ -265,7 +268,7 @@ sub get_dbh {
265268
$dbh->do($sql);
266269
MKDEBUG && _d('Enabling charset for STDOUT');
267270
if ( $charset eq 'utf8' ) {
268-
binmode(STDOUT, ':utf8')
271+
binmode(STDOUT, ':encoding(UTF-8)')
269272
or die "Can't binmode(STDOUT, ':utf8'): $OS_ERROR";
270273
}
271274
else {
@@ -612,6 +615,9 @@ sub ts_to_string {
612615

613616
sub parse_innodb_timestamp {
614617
my $text = shift;
618+
if ( ! defined $text ) {
619+
return (0, 0, 0, 0, 0, 0);
620+
}
615621
my ( $y, $m, $d, $h, $i, $s )
616622
= $text =~ m/^(\d\d)(\d\d)(\d\d) +(\d+):(\d+):(\d+)$/;
617623
die("Can't get timestamp from $text\n") unless $y;
@@ -803,7 +809,8 @@ sub parse_fk_transaction_error {
803809
# TODO: write some tests for this
804810
sub parse_innodb_record_dump {
805811
my ( $dump, $complete, $debug ) = @_;
806-
return undef unless $dump;
812+
# Use bare return as recommend in page 199 of PBP
813+
return unless $dump;
807814

808815
my $result = {};
809816

@@ -6769,6 +6776,9 @@ sub set_precision {
67696776
my ( $num, $precision ) = @_;
67706777
$num = 0 unless defined $num;
67716778
$precision = $config{num_digits}->{val} if !defined $precision;
6779+
if ( $num eq "" ) {
6780+
$num = int(0);
6781+
}
67726782
sprintf("%.${precision}f", $num);
67736783
}
67746784

@@ -6777,6 +6787,9 @@ sub set_precision {
67776787
sub percent {
67786788
my ( $num ) = @_;
67796789
$num = 0 unless defined $num;
6790+
if ( $num eq "" ) {
6791+
$num = int(0);
6792+
}
67806793
my $digits = $config{num_digits}->{val};
67816794
return sprintf("%.${digits}f", $num * 100)
67826795
. ($config{show_percent}->{val} ? '%' : '');
@@ -6841,7 +6854,7 @@ sub make_color_func {
68416854
push @criteria,
68426855
"( defined \$set->{$spec->{col}} && \$set->{$spec->{col}} $spec->{op} $val ) { return '$spec->{color}'; }";
68436856
}
6844-
return undef unless @criteria;
6857+
return unless @criteria;
68456858
my $sub = eval 'sub { my ( $set ) = @_; if ' . join(" elsif ", @criteria) . '}';
68466859
die if $EVAL_ERROR;
68476860
return $sub;
@@ -7521,10 +7534,10 @@ sub choose_connections {
75217534
sub do_stmt {
75227535
my ( $cxn, $stmt_name, @args ) = @_;
75237536

7524-
return undef if $file;
7537+
return if $file;
75257538

75267539
# Test if the cxn should not even be tried
7527-
return undef if $dbhs{$cxn}
7540+
return if $dbhs{$cxn}
75287541
&& $dbhs{$cxn}->{failed}
75297542
&& ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} );
75307543

@@ -7596,10 +7609,10 @@ sub handle_cxn_error {
75967609
sub do_query {
75977610
my ( $cxn, $query ) = @_;
75987611

7599-
return undef if $file;
7612+
return if $file;
76007613

76017614
# Test if the cxn should not even be tried
7602-
return undef if $dbhs{$cxn}
7615+
return if $dbhs{$cxn}
76037616
&& $dbhs{$cxn}->{failed}
76047617
&& ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} );
76057618

@@ -7781,7 +7794,7 @@ sub compile_select_stmt {
77817794
sub compile_filter {
77827795
my ( $text ) = @_;
77837796
my ( $sub, $err );
7784-
eval "\$sub = sub { my \$set = shift; $text }";
7797+
eval { $sub = sub { my $set = shift; $text } };
77857798
if ( $EVAL_ERROR ) {
77867799
$EVAL_ERROR =~ s/at \(eval.*$//;
77877800
$sub = sub { return $EVAL_ERROR };
@@ -8013,7 +8026,7 @@ sub load_config_plugins {
80138026

80148027
# First, find a list of all plugins that exist on disk, and get information about them.
80158028
my $dir = $config{plugin_dir}->{val};
8016-
foreach my $p_file ( <$dir/*.pm> ) {
8029+
foreach my $p_file (glob($dir."/*.pm")) {
80178030
my ($package, $desc);
80188031
eval {
80198032
open my $p_in, "<", $p_file or die $OS_ERROR;
@@ -9192,7 +9205,7 @@ sub switch_var_set {
91929205
# edit_stmt_sleep_times {{{3
91939206
sub edit_stmt_sleep_times {
91949207
$clear_screen_sub->();
9195-
my $stmt = prompt_list('Specify a statement', '', sub { return sort keys %stmt_maker_for });
9208+
my $stmt = prompt_list('Specify a statement', '', sub { my @tmparray = sort keys %stmt_maker_for; return @tmparray });
91969209
return unless $stmt && exists $stmt_maker_for{$stmt};
91979210
$clear_screen_sub->();
91989211
my $curr_val = $stmt_sleep_time_for{$stmt} || 0;
@@ -9843,7 +9856,7 @@ sub get_slave_status {
98439856
sub is_func {
98449857
my ( $word ) = @_;
98459858
return defined(&$word)
9846-
|| eval "my \$x= sub { $word }; 1"
9859+
|| eval { my $x = sub { $word }; 1 }
98479860
|| $EVAL_ERROR !~ m/^Bareword/;
98489861
}
98499862

debian/autobake-deb.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,17 @@ case "${LSBNAME}"
115115
in
116116
# Debian
117117
"buster")
118-
add_lsb_base_depends
119118
disable_libfmt
120119
replace_uring_with_aio
121120
if [ ! "$architecture" = amd64 ]
122121
then
123122
disable_pmem
124123
fi
125124
;&
126-
"bullseye"|"bookworm")
127-
if [[ "${LSBNAME}" == "bullseye" ]]
128-
then
129-
add_lsb_base_depends
130-
fi
125+
"bullseye")
126+
add_lsb_base_depends
127+
;&
128+
"bookworm")
131129
# mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools
132130
# so no removal is necessary.
133131
if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]]
@@ -145,17 +143,17 @@ in
145143
;;
146144
# Ubuntu
147145
"bionic")
148-
add_lsb_base_depends
149146
remove_rocksdb_tools
150147
[ "$architecture" != amd64 ] && disable_pmem
151148
;&
152149
"focal")
153-
add_lsb_base_depends
154150
replace_uring_with_aio
155151
disable_libfmt
156152
;&
157-
"impish"|"jammy"|"kinetic"|"lunar")
153+
"jammy"|"kinetic")
158154
add_lsb_base_depends
155+
;&
156+
"lunar"|"mantic")
159157
# mariadb-plugin-rocksdb s390x not supported by us (yet)
160158
# ubuntu doesn't support mips64el yet, so keep this just
161159
# in case something changes.

debian/mariadb-common.postinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ case "$1" in
3535
then
3636
update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mariadb.cnf" 500 || true
3737
fi
38-
;;
38+
;;
3939
esac
4040

4141
#DEBHELPER#

debian/mariadb-common.postrm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ case "$1" in
1010
then
1111
/usr/share/mysql-common/configure-symlinks remove mariadb "/etc/mysql/mariadb.cnf"
1212
fi
13-
;;
13+
;;
1414
esac
1515

1616
#DEBHELPER#

0 commit comments

Comments
 (0)