]> Cypherpunks repositories - gostls13.git/commit
database/sql: correctly report MaxIdleClosed stat
authorDaniel Theophanes <kardianos@gmail.com>
Sun, 30 Sep 2018 05:10:43 +0000 (22:10 -0700)
committerDaniel Theophanes <kardianos@gmail.com>
Tue, 2 Oct 2018 19:24:37 +0000 (19:24 +0000)
commit7db509e682891f3bc501c7b23e32e02c64893557
treeb650c82f7a2b38a5166c037739d532e7bfed588e
parent9aed4cc3956117d3d435bcd90e69d5e1820f8ad3
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 #27792

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>
src/database/sql/sql.go
src/database/sql/sql_test.go