N°1728: Display error on setup for unsupported MySQL 8+ versions (MariaDB & Percona not affected)

This commit is contained in:
Stephen Abello
2018-11-15 15:04:44 +01:00
parent 177b6d1757
commit b0c120d7fd

View File

@@ -418,12 +418,12 @@ class CMDBSource
{
$sDBVendor = static::ENUM_DB_VENDOR_MYSQL;
$sVersionComment = strtolower(static::GetServerVariable('version_comment'));
if(preg_match('/mariadb/', $sVersionComment) === 1)
$sVersionComment = static::GetServerVariable('version') . ' - ' . static::GetServerVariable('version_comment');
if(preg_match('/mariadb/i', $sVersionComment) === 1)
{
$sDBVendor = static::ENUM_DB_VENDOR_MARIADB;
}
else if(preg_match('/percona/', $sVersionComment) === 1)
else if(preg_match('/percona/i', $sVersionComment) === 1)
{
$sDBVendor = static::ENUM_DB_VENDOR_PERCONA;
}