Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 4.7.15
-
Fix Version/s: 4.7.16
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
Description
Chris Burgess reported seeing this query in the logs yesterday
INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) SELECT 12345 as user_id, contact_a.id as contact_id, 'View' as operation FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact multisiteGroupTable ON contact_a.id = multisiteGroupTable.contact_id WHERE (contact_a.id = 12345 OR ((multisiteGroupTable.group_id IN (123) AND multisiteGroupTable.status IN ('Added') ) AND (contact_a.is_deleted = 0))) GROUP BY contact_a.id ON DUPLICATE KEY UPDATE user_id=VALUES(user_id), contact_id=VALUES(contact_id), operation=VALUES(operation)
This query should not arise as when building caches CRM_ACL_API::whereClause should be called with the parameter $skipOwnContactClause set to TRUE
I wanted to log this to ensure we are tracking it and to ensure people realise the nature of this issue, however, I'm hoping to get a backtrace off Chris to make it addressable.
Attachments
Issue Links
- supplements
-
CRM-19934 Performance improvement on civicrm_acl_contact_cache
- Open