Closes #3440043
1 unresolved thread
1 unresolved thread
- /core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php
- /core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
Closes #3440043
Merge request reports
Activity
- Resolved by mondrake
added 38 commits
-
43cf84c9...d74c1cad - 36 commits from branch
project:11.x
- 4db66559 - Update 2 files
- 3b2fe448 - Update file TransactionManager.php
-
43cf84c9...d74c1cad - 36 commits from branch
added 1 commit
- c5b235a0 - Update DriverSpecificTransactionTestBase.php
328 328 // If this was the root Drupal transaction, we can rollback the client 329 329 // transaction. The transaction is closed. 330 330 $this->processRootRollback(); 331 // The Transaction object remains open, and when it will get destructed 332 // no commit should happen. Void the stack item. 333 $this->voidStackItem($id); 331 if ($this->getConnectionTransactionState() === ClientConnectionTransactionState::RolledBack) { 332 // The Transaction object remains open, and when it will get destructed 333 // no commit should happen. Void the stack item. 334 $this->voidStackItem($id); 335 } - Comment on lines -331 to +335
BTW we discover and fix a bug here...
::processRootRollback()
above already voids the item, so calling::voidStackItem()
on it fails, since it's removed from the stack.The fact that nobody complained (this is a missing offset error just after the warning) probably tells a lot about whether this code path occurs in real world...
In our testing ATM, we do not get to
::voidStackItem()
because intestTransactionWithDdlStatement()
the warning is transformed into an exception (in PHPUnit 9), and then caught and never returning to code execution.
Please register or sign in to reply