From 527b1460543ece423a2116daafb58b681a306503 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 30 Sep 2015 09:45:52 +0200 Subject: [PATCH] monitoring: Remove unnecessary columns in the GROUP BY list for MySQL refs #9956 --- .../library/Monitoring/Backend/Ido/Query/IdoQuery.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php index fb34a0363..8009faa0f 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php @@ -1001,6 +1001,9 @@ abstract class IdoQuery extends DbQuery } $groupedTables[$table] = true; } + if ($this->getDatasource()->getDbType() !== 'pgsql') { + return $group; + } $columnIterator = new AppendIterator(); $columnIterator->append(new ColumnFilterIterator($this->columns)); $columnIterator->append(new ArrayIterator($this->orderColumns)); @@ -1068,7 +1071,7 @@ abstract class IdoQuery extends DbQuery } } - return $group; + return array_unique($group); } // TODO: Move this away, see note related to $idoVersion var