Commit 2c40ef6b authored by bgm's avatar bgm

CRM-21455 supportsFullGroupBy: MariaDB 10.2 does not support ANY_VALUE

parent b52f032d
......@@ -69,11 +69,22 @@ class CRM_Utils_SQL {
}
/**
* Does this System support the MYSQL mode ONLY_FULL_GROUP_BY
* Checks if this system enforce the MYSQL mode ONLY_FULL_GROUP_BY.
* This function should be named supportsAnyValueAndEnforcesFullGroupBY(),
* but should be deprecated instead.
*
* @return mixed
* @deprecated
*/
public static function supportsFullGroupBy() {
return version_compare(CRM_Core_DAO::singleValueQuery('SELECT VERSION()'), '5.7', '>=');
// CRM-21455 MariaDB 10.2 does not support ANY_VALUE
$version = CRM_Core_DAO::singleValueQuery('SELECT VERSION()');
if (stripos('mariadb', $version) !== NULL) {
return FALSE;
}
return version_compare($version, '5.7', '>=');
}
/**
......
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