]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.11] database/sql: correctly report MaxIdleClosed stat
authorDaniel Theophanes <kardianos@gmail.com>
Sun, 30 Sep 2018 05:10:43 +0000 (22:10 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Nov 2018 18:40:52 +0000 (18:40 +0000)
commit369c188667420762ff498e36f3a82b159d15f70d
tree4d136d6694481f7f1c4edeaea2727fa2dfe759c4
parenteb46d15471b2e179c041ec5398ccbe44b7e49014
[release-branch.go1.11] database/sql: correctly report MaxIdleClosed stat

Previously the MaxIdleClosed counter was incremented when added
to the free connection list, rather then when it wasn't added
to the free connection list. Flip this logic to correct.

Fixes #28325

Change-Id: I405302c14fb985369dab48fbe845e5651afc4ccf
Reviewed-on: https://go-review.googlesource.com/c/138578
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 7db509e682891f3bc501c7b23e32e02c64893557)
Reviewed-on: https://go-review.googlesource.com/c/146697
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
src/database/sql/sql.go
src/database/sql/sql_test.go