mirror of
https://github.com/containers/podman
synced 2024-10-19 16:54:07 +00:00
HACK: monkey-patch gosqlite3 to rollback unconditionally after tx error
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
This commit is contained in:
parent
4ecebf20b4
commit
4bc9a6d633
2
vendor/github.com/mattn/go-sqlite3/sqlite3.go
generated
vendored
2
vendor/github.com/mattn/go-sqlite3/sqlite3.go
generated
vendored
|
@ -313,7 +313,7 @@ func (ai *aggInfo) Done(ctx *C.sqlite3_context) {
|
|||
// Commit transaction.
|
||||
func (tx *SQLiteTx) Commit() error {
|
||||
_, err := tx.c.exec(context.Background(), "COMMIT", nil)
|
||||
if err != nil && err.(Error).Code == C.SQLITE_BUSY {
|
||||
if err != nil { // && err.(Error).Code == C.SQLITE_BUSY {
|
||||
// sqlite3 will leave the transaction open in this scenario.
|
||||
// However, database/sql considers the transaction complete once we
|
||||
// return from Commit() - we must clean up to honour its semantics.
|
||||
|
|
Loading…
Reference in a new issue