From 6efd436a752c28c4d071da5cfd906abd2402f9d9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Jun 2016 13:43:11 +0200 Subject: [PATCH] need to switch ONLY_FULL_GROUP_BY of for MySQL >= 5.7 --- api/src/Db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Db.php b/api/src/Db.php index d7a19e9e56..9eab22ccc3 100644 --- a/api/src/Db.php +++ b/api/src/Db.php @@ -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__); }