]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] database/sql: ensure driverConns are closed if not returned...
authorDaniel Theophanes <kardianos@gmail.com>
Thu, 9 Feb 2017 05:38:51 +0000 (21:38 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 10 Feb 2017 17:53:36 +0000 (17:53 +0000)
commitd84dee069a534bd7a35ec4062a92a04ce9c2806e
treecbae73613378b5f57516891330ab17eed3e8fc8a
parentf1e44a4b7426e03bff7ed4f75a91e57c498d3463
[release-branch.go1.8] database/sql: ensure driverConns are closed if not returned to pool

Previously if a connection was requested but timed out during the
request and when acquiring the db.Lock the connection request
is fulfilled and the request is unable to be returned to the
connection pool, then then driver connection would not be closed.

No tests were added or modified because I was unable to determine
how to trigger this situation without something invasive.

Change-Id: I9d4dc680e3fdcf63d79d212174a5b8b313f363f1
Reviewed-on: https://go-review.googlesource.com/36641
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/36714
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/database/sql/sql.go