need to switch ONLY_FULL_GROUP_BY of for MySQL >= 5.7

This commit is contained in:
Ralf Becker 2016-06-28 13:43:11 +02:00
parent 27cfc4d2e0
commit 6efd436a75

View File

@ -526,7 +526,7 @@ class Db
$this->set_capabilities($Type,$this->ServerInfo['version']);
// switch off MySQL 5.7+ ONLY_FULL_GROUP_BY sql_mode
if (substr($this->Type, 0, 5) == 'mysql' && $this->ServerInfo['version'] > 5.7 && $this->ServerInfo['version'] < 10.0)
if (substr($this->Type, 0, 5) == 'mysql' && $this->ServerInfo['version'] >= 5.7 && $this->ServerInfo['version'] < 10.0)
{
$this->query("SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))", __LINE__, __FILE__);
}