mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
PT-2340 - Support MySQL 8.4
- Removed all unneeded occuriences of the word "master" in lib
This commit is contained in:
@@ -702,18 +702,25 @@ sub normalize_checksum_results {
|
||||
return $normal_output;
|
||||
}
|
||||
|
||||
sub get_master_binlog_pos {
|
||||
sub get_source_binlog_pos {
|
||||
my ($dbh) = @_;
|
||||
my $sql = "SHOW MASTER STATUS";
|
||||
|
||||
my $vp = VersionParser->new($dbh);
|
||||
my $source_name = 'source';
|
||||
if ( $vp->cmp('8.1') < 0 || $vp->flavor() =~ m/maria/i ) {
|
||||
$source_name = 'master';
|
||||
}
|
||||
|
||||
my $sql = "SHOW ${source_name} STATUS";
|
||||
my $ms = $dbh->selectrow_hashref($sql);
|
||||
return $ms->{position};
|
||||
}
|
||||
|
||||
sub get_slave_pos_relative_to_master {
|
||||
sub get_slave_pos_relative_to_source {
|
||||
my ($dbh) = @_;
|
||||
my $sql = "SHOW SLAVE STATUS";
|
||||
my $ss = $dbh->selectrow_hashref($sql);
|
||||
return $ss->{exec_master_log_pos};
|
||||
return $ss->{exec_source_log_pos};
|
||||
}
|
||||
|
||||
# Like output(), but forks a process to execute the coderef.
|
||||
|
@@ -112,7 +112,7 @@ sub find_cluster_nodes {
|
||||
# If there wasn't a port, that means that this bug
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1082406
|
||||
# isn't fixed on this version of PXC. We tried using the
|
||||
# master's port, but that didn't work. So try again, using
|
||||
# source's port, but that didn't work. So try again, using
|
||||
# the default port.
|
||||
if ( !$port && $dsn->{P} != 3306 ) {
|
||||
$address .= ":3306";
|
||||
|
Reference in New Issue
Block a user