]> Cypherpunks repositories - gostls13.git/commit
database/sql: correctly guard the query Row preventing early release
authorDaniel Theophanes <kardianos@gmail.com>
Fri, 7 Apr 2017 19:21:50 +0000 (12:21 -0700)
committerDaniel Theophanes <kardianos@gmail.com>
Wed, 12 Apr 2017 17:36:26 +0000 (17:36 +0000)
commitdec95d8fad2e1b3dea3fa1472cc21542c40236ce
treed5b1f1eadb14c26086a9079f3a8639015b23517e
parent10a200e56000c03fc820d6d43853b43b9e1c8a8c
database/sql: correctly guard the query Row preventing early release

When a Tx starts a query, prevent returning the connection to the pool
until after the query finishes.

Fixes #19058

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