Skip to content

Commit 8f3e6c3

Browse files
committed
compatibility
1 parent c5a42b0 commit 8f3e6c3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/MySQLReplication/Event/QueryEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public function makeQueryDTO()
4444
*/
4545
private function getSizeToRemoveByVersion()
4646
{
47+
48+
var_dump(BinLogServerInfo::getVersion());
4749
if (BinLogServerInfo::MYSQL_VERSION_MARIADB === BinLogServerInfo::getVersion())
4850
{
4951
return 13;

src/MySQLReplication/Repository/MySQLRepository.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,16 @@ public function isCheckSum()
8080
*/
8181
public function getVersion()
8282
{
83-
$res = $this->getConnection()->fetchAssoc('SHOW VARIABLES LIKE "version_comment"');
84-
if (!empty($res['Value']))
83+
$r = '';
84+
$versions = $this->getConnection()->fetchAll('SHOW VARIABLES LIKE "version%"');
85+
if (is_array($versions) && 0 !== count($versions))
8586
{
86-
return $res['Value'];
87+
foreach ($versions as $version)
88+
{
89+
$r .= $version['Value'];
90+
}
8791
}
88-
return '';
92+
return $r;
8993
}
9094

9195
/**

0 commit comments

Comments
 (0)