Fix Replication Status

Reference Issue #553 
Reversing the check for version of mysql or mariadb to use correct command.
This commit is contained in:
Steve8291 2021-08-26 10:21:23 -04:00 committed by GitHub
parent 3225a954fc
commit 911b1294fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1179,20 +1179,20 @@ sub get_all_vars {
my @mysqlslave; my @mysqlslave;
if ( mysql_version_eq(8) or mysql_version_ge( 10, 5 ) ) { 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 { else {
@mysqlslave = select_array("SHOW REPLICA STATUS\\G"); @mysqlslave = select_array("SHOW SLAVE STATUS\\G");
} }
arr2hash( \%myrepl, \@mysqlslave, ':' ); arr2hash( \%myrepl, \@mysqlslave, ':' );
$result{'Replication'}{'Status'} = \%myrepl; $result{'Replication'}{'Status'} = \%myrepl;
my @mysqlslaves; my @mysqlslaves;
if ( mysql_version_eq(8) or mysql_version_ge( 10, 5 ) ) { if ( mysql_version_eq(8) or mysql_version_ge( 10, 5 ) ) {
@mysqlslaves = select_array "SHOW SLAVE HOSTS"; @mysqlslaves = select_array "SHOW SLAVE STATUS";
} }
else { else {
@mysqlslaves = select_array("SHOW SLAVE STATUS\\G"); @mysqlslaves = select_array("SHOW SLAVE HOSTS\\G");
} }
my @lineitems = (); my @lineitems = ();