PT-2440 - Support for MariaDB 10.5

- Updated non-libraries code in bin/pt-heartbeat, bin/pt-replica-restart, and bin/pt-slave-delay
- Adjusted lib/Sandbox.pm, so it does not require SSL for MariaDB
- Adjusted test case, so it is in line with other tests
This commit is contained in:
Sveta Smirnova
2025-08-23 03:32:33 +03:00
parent a97c422851
commit 495869da3e
5 changed files with 61 additions and 49 deletions

View File

@@ -6454,7 +6454,7 @@ sub main {
my $vp = VersionParser->new($dbh);
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -6497,7 +6497,7 @@ sub main {
my $sql;
if ( @master_status_cols ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/ ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/i ) {
$sql = 'SHOW BINARY LOG STATUS';
}
else {
@@ -6515,7 +6515,7 @@ sub main {
}
if ( @slave_status_cols ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/ ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/i ) {
$sql = 'SHOW REPLICA STATUS';
}
else {

View File

@@ -5438,7 +5438,7 @@ sub watch_server {
my $source_name = 'source';
my $source_change = 'replication source';
my $replica_name = 'replica';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
$source_change = 'master';
$replica_name = 'slave';

View File

@@ -4559,7 +4559,7 @@ sub main {
# Check version, refuse working with 8.4
my $version = VersionParser->new($slave_dbh);
if ( $version ge '8.1' && $version->flavor() !~ m/maria/ ) {
if ( $version ge '8.1' && $version->flavor() !~ m/maria/i ) {
die "This tool does not work with MySQL 8.1 and newer.\n";
}