Skip to content

Commit

Permalink
Merge pull request #563 from Steve8291/patch-1
Browse files Browse the repository at this point in the history
Fix Replication Status
  • Loading branch information
jmrenouard authored Aug 26, 2021
2 parents 3225a95 + 911b129 commit 0aa4995
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1179,20 +1179,20 @@ sub get_all_vars {

my @mysqlslave;
if ( mysql_version_eq(8) or mysql_version_ge( 10, 5 ) ) {
@mysqlslave = select_array("SHOW SLAVE STATUS\\G");
@mysqlslave = select_array("SHOW REPLICA STATUS\\G");
}
else {
@mysqlslave = select_array("SHOW REPLICA STATUS\\G");
@mysqlslave = select_array("SHOW SLAVE STATUS\\G");
}
arr2hash( \%myrepl, \@mysqlslave, ':' );
$result{'Replication'}{'Status'} = \%myrepl;

my @mysqlslaves;
if ( mysql_version_eq(8) or mysql_version_ge( 10, 5 ) ) {
@mysqlslaves = select_array "SHOW SLAVE HOSTS";
@mysqlslaves = select_array "SHOW SLAVE STATUS";
}
else {
@mysqlslaves = select_array("SHOW SLAVE STATUS\\G");
@mysqlslaves = select_array("SHOW SLAVE HOSTS\\G");
}

my @lineitems = ();
Expand Down

0 comments on commit 0aa4995

Please sign in to comment.