[13.x] Roll back transactions manager when commit fails
Merged
PA
9d ago+37+37+01234567890123456789-0-0-0123456789
Fixes #61964.
handleCommitTransactionException() decremented the connection's transaction level but never notified DatabaseTransactionsManager, so the failed root transaction stayed pending and afterCommit callbacks hung or ran twice on retry. It now calls rollback() on the manager, like the other paths that end a transaction.
Test: testFailedCommitRollsBackTheTransactionsManager (fails without the fix).