Commit 198a5ad8 authored by Robert Lyon's avatar Robert Lyon

Bug 1850631: Extending the check for MariaDB / Percona

To look at 'version' value if the 'version_comment' value doesn't
return a match

behatnotneeded

Change-Id: I71a45c8327a3d65cc32620ccfb3ee2488b06db03
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent f83071ba
......@@ -1809,6 +1809,7 @@ function mysql_get_type() {
if (!is_mysql()) {
throw new SQLException('mysql_get_type() expects a mysql database');
}
// First check against version_comment as some older versions store the info we need there
$mysqltype = mysql_get_variable('version_comment');
if (stripos($mysqltype, 'MariaDB') !== false) {
return 'mariadb';
......@@ -1816,9 +1817,15 @@ function mysql_get_type() {
else if (stripos($mysqltype, 'Percona') !== false) {
return 'percona';
}
else {
return 'mysql';
// Then check against version as some newer versions store the info we need there
$mysqltype = mysql_get_variable('version');
if (stripos($mysqltype, 'MariaDB') !== false) {
return 'mariadb';
}
else if (stripos($mysqltype, 'Percona') !== false) {
return 'percona';
}
return 'mysql';
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment