Follow up of #3586760: Use composite key Upsert queries in core.
Problem/Motivation
Merge::execute() should be occurring in a transaction.
Proposed resolution
Option 1:
- Deprecate calling Merge::execute() outside of a transaction
- Do not call select() second time upon insert in case of insert failure AND in transaction
Option 2:
- Wrap Merge::execute() into a startTransaction/commitOrRelease structure, so that
- if a transaction is already active when Merge::execute() is called, the Transaction manager will manage as a SAVEPOINT/RELEASE SAVEPOINT operation
- if a transaction is not active when Merge::execute() is called, the Transaction manager will manage as a BEGIN TRANSACTION/COMMIT operation
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3605466
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mondrakeComment #4
mondrakeComment #5
daffie commentedThe change look fine by me.
@mondrake: Should we add testing for the change?