From b7f0270a242e346c35ec250e9388c38eff15a83e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 4 Jul 2018 15:29:22 +0200 Subject: [PATCH] Use SELECT 1 for subquery filters refs #2934 --- .../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 1c5b331a3..62ae9b212 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php @@ -611,7 +611,10 @@ abstract class IdoQuery extends DbQuery $subQuery ->setFilter($subQueryFilter) - ->clearGroupingRules(); + ->clearGroupingRules() + ->select() + ->reset('columns') + ->columns([new Zend_Db_Expr('1')]); // EXISTS is the column name because without any column $this->isCustomVar() fails badly otherwise. // Additionally it bypasses the non-required optimizations made by our filter rendering implementation.