summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-06 15:38:51 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-09 15:01:34 +0000
commit4bc9a6d63370b4bd9cfb29e52f4f0dbb0070f856 (patch)
treeaf0a059011634847a8bf486438ec5ac84c3c5864 /vendor
parent4ecebf20b4e41720b9a0b55e0c22f05061c77e60 (diff)
downloadpodman-4bc9a6d63370b4bd9cfb29e52f4f0dbb0070f856.tar.gz
podman-4bc9a6d63370b4bd9cfb29e52f4f0dbb0070f856.tar.bz2
podman-4bc9a6d63370b4bd9cfb29e52f4f0dbb0070f856.zip
HACK: monkey-patch gosqlite3 to rollback unconditionally after tx error
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/mattn/go-sqlite3/sqlite3.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/mattn/go-sqlite3/sqlite3.go b/vendor/github.com/mattn/go-sqlite3/sqlite3.go
index 1ff58c3cd..03b82d178 100644
--- a/vendor/github.com/mattn/go-sqlite3/sqlite3.go
+++ b/vendor/github.com/mattn/go-sqlite3/sqlite3.go
@@ -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.