Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.9, 4.3.5, 4.4.0
-
Fix Version/s: 4.4.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
CiviCRM supports a system for transaction commits and rollbacks:
http://wiki.civicrm.org/confluence/display/CRMDOC43/Transaction+Reference
However, if a transaction creates a contact using CRM_Contact_BAO_Contact::create(), the transaction will commit prematurely – because it calls CRM_ACL_BAO_Cache::resetCache() which issues the statement "TRUNCATE TABLE civicrm_acl_contact_cache". To properly respect transactions, it should either use "DELETE FROM" or defer the truncation until the transaction completes.
(The relevant TRUNCATE statement dates back to CiviCRM v3.1.)