Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQLite: Fix missing
RELEASE
of savepoinst in transactionSync()
.
`ROLLBACK TO` does not release the savepoint, just rolls back to the point immediately after the savepoint was created. We must additionally release it. This never caused a problem becaues: 1. `transactionSync()` always runs inside an implicit transaction. Committing or rolling back the implicit transaction implicitly releases all the savepoints. 2. It turns out SQLite allows savepoints with the same name as previous ones. The name always refers to the most-recent savepoint by that name which hasn't been released. So, the "leaked" savepoint didn't prevent a new savepoint with the same name from being created later. Note that the async version of `transaction()` does release savepoints properly. I also added a TODO to take advantage of the fact that savepoints can have the same name...
- Loading branch information