Skip to content

Commit

Permalink
Change to supported MySQL 8.4 commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dlmorri75 committed May 9, 2024
1 parent 3d141d4 commit e3deef5
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/Replication/ReplicationInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ final class ReplicationInfo

/** @var string[] */
public array $replicaVariables = [
'Slave_IO_State',
'Master_Host',
'Master_User',
'Master_Port',
'Replica_IO_State',
'Source_Host',
'Source_User',
'Source_Port',
'Connect_Retry',
'Master_Log_File',
'Read_Master_Log_Pos',
'Source_Log_File',
'Read_Source_Log_Pos',
'Relay_Log_File',
'Relay_Log_Pos',
'Relay_Master_Log_File',
'Slave_IO_Running',
'Slave_SQL_Running',
'Relay_Source_Log_File',
'Replica_IO_Running',
'Replica_SQL_Running',
'Replicate_Do_DB',
'Replicate_Ignore_DB',
'Replicate_Do_Table',
Expand All @@ -37,18 +37,18 @@ final class ReplicationInfo
'Last_Errno',
'Last_Error',
'Skip_Counter',
'Exec_Master_Log_Pos',
'Exec_Source_Log_Pos',
'Relay_Log_Space',
'Until_Condition',
'Until_Log_File',
'Until_Log_Pos',
'Master_SSL_Allowed',
'Master_SSL_CA_File',
'Master_SSL_CA_Path',
'Master_SSL_Cert',
'Master_SSL_Cipher',
'Master_SSL_Key',
'Seconds_Behind_Master',
'Source_SSL_Allowed',
'Source_SSL_CA_File',
'Source_SSL_CA_Path',
'Source_SSL_Cert',
'Source_SSL_Cipher',
'Source_SSL_Key',
'Seconds_Behind_Source',
];

/** @var mixed[] */
Expand Down Expand Up @@ -92,7 +92,7 @@ public function load(string|null $connection = null): void

private function setPrimaryStatus(): void
{
$this->primaryStatus = $this->dbi->fetchResult('SHOW MASTER STATUS');
$this->primaryStatus = $this->dbi->fetchResult('SHOW BINARY LOG STATUS');
}

/** @return mixed[] */
Expand All @@ -103,7 +103,7 @@ public function getPrimaryStatus(): array

private function setReplicaStatus(): void
{
$this->replicaStatus = $this->dbi->fetchResult('SHOW SLAVE STATUS');
$this->replicaStatus = $this->dbi->fetchResult('SHOW REPLICA STATUS');
}

/** @return mixed[] */
Expand All @@ -114,7 +114,7 @@ public function getReplicaStatus(): array

private function setMultiPrimaryStatus(): void
{
$this->multiPrimaryStatus = $this->dbi->fetchResult('SHOW ALL SLAVES STATUS');
$this->multiPrimaryStatus = $this->dbi->fetchResult('SHOW ALL REPLICAS STATUS');
}

private function setDefaultPrimaryConnection(string $connection): void
Expand Down

0 comments on commit e3deef5

Please sign in to comment.