Use SELECT 1 for subquery filters

refs #2934
This commit is contained in:
Eric Lippmann 2018-07-04 15:29:22 +02:00
parent 28e68f8f8a
commit b7f0270a24
1 changed files with 4 additions and 1 deletions

View File

@ -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.