We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ccccfb commit 6b59a48Copy full SHA for 6b59a48
sqlite3.go
@@ -494,7 +494,7 @@ func (ai *aggInfo) Done(ctx *C.sqlite3_context) {
494
// Commit transaction.
495
func (tx *SQLiteTx) Commit() error {
496
_, err := tx.c.exec(context.Background(), "COMMIT", nil)
497
- if err != nil && err.(Error).Code == C.SQLITE_BUSY {
+ if err != nil && (err.(Error).Code == C.SQLITE_BUSY || err.(Error).Code == C.SQLITE_CONSTRAINT) {
498
// sqlite3 will leave the transaction open in this scenario.
499
// However, database/sql considers the transaction complete once we
500
// return from Commit() - we must clean up to honour its semantics.
0 commit comments