Skip to content

Commit 4e6462c

Browse files
committed
Add query for MySQL 8.4
1 parent 74d4f57 commit 4e6462c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/MySQLReplication/Repository/MySQLRepository.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,14 @@ public function getVersion(): string
7070

7171
public function getMasterStatus(): MasterStatusDTO
7272
{
73+
$query = 'SHOW MASTER STATUS';
74+
75+
if (str_starts_with($this->getVersion(), '8.4')) {
76+
$query = 'SHOW BINARY LOG STATUS';
77+
}
78+
7379
$data = $this->getConnection()
74-
->fetchAssociative('SHOW MASTER STATUS');
80+
->fetchAssociative($query);
7581
if (empty($data)) {
7682
throw new BinLogException(
7783
MySQLReplicationException::BINLOG_NOT_ENABLED,

0 commit comments

Comments
 (0)