Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13085

Transaction rollback doesn't work with contact creation (due to ACL TRUNCATE)

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

        Attachments

          Activity

            People

            • Assignee:
              deepak Deepak Srivastava
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: