Skip to content

Release savepoints after rollback#1367

Open
ShiroKSH wants to merge 1 commit into
stephencelis:masterfrom
ShiroKSH:fix/release-rolled-back-savepoints
Open

Release savepoints after rollback#1367
ShiroKSH wants to merge 1 commit into
stephencelis:masterfrom
ShiroKSH:fix/release-rolled-back-savepoints

Conversation

@ShiroKSH

Copy link
Copy Markdown

Summary

  • release a savepoint after rolling it back
  • keep rollback and release as separate SQLite statements
  • cover nested cleanup and successful transaction reuse after a rollback

Root cause

ROLLBACK TO SAVEPOINT rewinds database changes but leaves the savepoint active. The connection therefore remained inside a transaction after a throwing outermost savepoint block, causing the next transaction to fail with cannot start a transaction within a transaction.

Impact

Failed savepoint blocks now leave the connection ready for subsequent transactions. Normal transaction and successful savepoint behavior are unchanged.

Validation

  • git diff --check
  • targeted SQLite state-transition reproduction for nested rollback/release cleanup and subsequent transaction reuse

@ShiroKSH ShiroKSH marked this pull request as ready for review July 11, 2026 14:15
@ShiroKSH

Copy link
Copy Markdown
Author

@stephencelis We'd appreciate it if you could take a look at this pull request when you have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant