Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!5743
Leaving the savepoint in the transaction stack upon rollback is incorrect
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Leaving the savepoint in the transaction stack upon rollback is incorrect
issue/drupal-3407080:3407080-leaving-the-savepoint
into
11.x
Overview
0
Commits
3
Pipelines
2
Changes
2
Closed
mondrake
requested to merge
issue/drupal-3407080:3407080-leaving-the-savepoint
into
11.x
1 year ago
Overview
0
Commits
3
Pipelines
2
Changes
2
Expand
/core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php
/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificTransactionTestBase.php
Closes
#3407080
0
0
Merge request reports
Compare
11.x
version 1
d73f9345
1 year ago
11.x (base)
and
latest version
latest version
aa41753d
3 commits,
1 year ago
version 1
d73f9345
1 commit,
1 year ago
2 files
+
108
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php
+
6
−
2
Options
@@ -318,9 +318,13 @@ public function rollback(string $name, string $id): void {
if
(
$this
->
getConnectionTransactionState
()
===
ClientConnectionTransactionState
::
Active
)
{
if
(
$this
->
stackDepth
()
>
1
&&
$this
->
stack
()[
$id
]
->
type
===
StackItemType
::
Savepoint
)
{
// Rollback the client transaction to the savepoint when the Drupal
// transaction is not a root one. The
savepoint and therefore t
he
// client connection remain active.
// transaction is not a root one. The
n, release the savepoint too. T
he
// client connection remain
s
active.
$this
->
rollbackClientSavepoint
(
$name
);
$this
->
releaseClientSavepoint
(
$name
);
// The Transaction object remains open, and when it will get destructed
// no commit should happen. Void the stack item.
$this
->
voidStackItem
(
$id
);
}
elseif
(
$this
->
stackDepth
()
===
1
&&
$this
->
stack
()[
$id
]
->
type
===
StackItemType
::
Root
)
{
// If this was the root Drupal transaction, we can rollback the client
Loading