PT-2340 - Support MySQL 8.4

- Updated modules and tests for pt-online-schema-change
- Removed typo from lib/MasterSlave.pm
This commit is contained in:
Sveta Smirnova
2024-07-29 18:47:13 +03:00
parent 5c999ca3e0
commit 76c1202cb5
69 changed files with 1606 additions and 1380 deletions

View File

@@ -503,7 +503,7 @@ sub get_replica_status {
my $server_version = VersionParser->new($dbh);
my $replica_name = 'replica';
if ( $server_version < '8.1' || $server_version->flavor() =~ m/maria/ ) {
$replica_name = 'replica';
$replica_name = 'slave';
}
if ( !$self->{not_a_replica}->{$dbh} ) {
@@ -678,7 +678,7 @@ sub stop_replica {
my $vp = VersionParser->new($dbh);
my $replica_name = 'replica';
if ( $vp < '8.1' || $vp->flavor() =~ m/maria/ ) {
$replica_name = 'replica';
$replica_name = 'slave';
}
my $sth = $self->{sths}->{$dbh}->{STOP_REPLICA}
||= $dbh->prepare("STOP ${replica_name}");

View File

@@ -71,6 +71,7 @@ our @EXPORT = qw(
$source_name
$source_status
$source_reset
$source_change
$replica_name
);
@@ -85,11 +86,13 @@ eval {
our $source_name = 'source';
our $source_status = 'binary log';
our $source_reset = 'binary logs and gtids';
our $source_change = 'replication source';
our $replica_name = 'replica';
if ( $sandbox_version < '8.1' || ( $ENV{FORK} || "" eq 'mariadb' ) ) {
$source_name = 'master';
$source_status = 'master';
$source_reset = 'master';
$source_change = 'master';
$replica_name = 'slave';
}