]> Cypherpunks.ru repositories - gostls13.git/commit
database/sql: shortestIdleTimeLocked correct min comparison
authorShinnosuke Sawada <6warashi9@gmail.com>
Mon, 17 Aug 2020 11:37:51 +0000 (20:37 +0900)
committerDaniel Theophanes <kardianos@gmail.com>
Sat, 29 Aug 2020 09:20:35 +0000 (09:20 +0000)
commit4fc3896e7933e31822caa50e024d4e139befc75f
tree614d5460b8a3653159d156653ff042572d8e2d1e
parent27a30186abc18a8fc22b8ab40e3ee9f29d81c1d4
database/sql: shortestIdleTimeLocked correct min comparison

When zero or less, maxIdleTime and maxLifetime means unlimited.
Helper function shortestIdleTimeLocked must not return the
minimum of the two until both are verified to be greater
then zero.

Fixes #40841

Change-Id: I1130332baf4ad259cd90c10f4221f5def8510655
Reviewed-on: https://go-review.googlesource.com/c/go/+/248817
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
src/database/sql/sql.go