Unverified Commit cdd2ef9a authored by eileen's avatar eileen 🎱 Committed by GitHub

Merge pull request #11339 from mlutfy/4.7.28-rc-crm21455

CRM-21455 supportsFullGroupBy: MariaDB 10.2 does not support ANY_VALUE
parents b46ba6a4 2c40ef6b
......@@ -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