]> Cypherpunks repositories - gostls13.git/commit
database/sql: ensure Commit and Rollback return ErrTxDone
authorDaniel Theophanes <kardianos@gmail.com>
Thu, 1 Dec 2016 19:07:11 +0000 (11:07 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Dec 2016 22:20:31 +0000 (22:20 +0000)
commitae9712c76688a07e1149958994a9ab3e5a99c37f
tree7c3211920785161532d5259bf6151d4517c704c1
parent2d136ae82e68bc820804b6a38262f240ea2bb5cf
database/sql: ensure Commit and Rollback return ErrTxDone

Ensure documented behavior of returning ErrTxDone if the Tx has
already been committed or rolled back.

Fixes #18147

Change-Id: I07dc75bef4dbd4dd88dd252c96dc8ab99f28c00e
Reviewed-on: https://go-review.googlesource.com/33793
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/database/sql/sql.go
src/database/sql/sql_test.go