Skip to content

Commit 355c62a

Browse files
committed
AbstractMySQLDriver. Use MariaDb1043Platform where applicable.
Select MariaDb1043Platform where MariaDb database is at version 10.4.3 or later.
1 parent 5b0b3a4 commit 355c62a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Driver/AbstractMySQLDriver.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
1010
use Doctrine\DBAL\Platforms\AbstractPlatform;
1111
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
12+
use Doctrine\DBAL\Platforms\MariaDb1043Platform;
1213
use Doctrine\DBAL\Platforms\MySQL57Platform;
1314
use Doctrine\DBAL\Platforms\MySQL80Platform;
1415
use Doctrine\DBAL\Platforms\MySQLPlatform;
@@ -34,6 +35,10 @@ abstract class AbstractMySQLDriver implements VersionAwarePlatformDriver
3435
public function createDatabasePlatformForVersion($version)
3536
{
3637
$mariadb = stripos($version, 'mariadb') !== false;
38+
if ($mariadb && version_compare($this->getMariaDbMysqlVersionNumber($version), '10.4.3', '>=')) {
39+
return new MariaDb1043Platform();
40+
}
41+
3742
if ($mariadb && version_compare($this->getMariaDbMysqlVersionNumber($version), '10.2.7', '>=')) {
3843
return new MariaDb1027Platform();
3944
}

0 commit comments

Comments
 (0)