Not the answer you need?
Register and ask your own question!

Problem with count() after upgrade to 5.6.17-66

t3chn0rt3chn0r EntrantInactive User Role Beginner
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(r)')
->leftJoin('r.Member', 'm')
->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?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.