Queries that perform count() are not behaving correctly anymore after upgrading to 5.6.17-66 (no problems with 5.6.17-65).
I’m using the Symfony2 framework and this is part of the query I’m executing:
$queryBuilder = $this->doctrine->getRepository(‘LifestyleEngineSocialBundle:Rendezvous’)->createQueryBuilder(‘r’);
$tRendezvous = $queryBuilder ->select(‘count®’)
->leftJoin(‘LifestyleEngineSocialBundle:Friendship’, ‘f’, ‘WITH’, ‘f.memberId = :memberId AND f.friendId = r.memberId AND f.status = :friendshipAccepted’)
->leftJoin(‘LifestyleEngineSocialBundle:Friendship’, ‘ff’, ‘WITH’, ‘ff.friendId = r.memberId AND ff.status = :friendshipAccepted AND ff.memberId IN (SELECT g.friendId FROM LifestyleEngineSocialBundle:Friendship g WHERE g.memberId = :memberId AND g.status = :friendshipAccepted)’)
The count() now seems to return the number of records being selected on the 3rd join (SELECT g.friendId…) instead of the count() of the records being selected from the table Rendezvous.
Is there any way to roll back this update easily?