go/src/database/sql
Philip Roberts 7b263895f7 database/sql: wake cleaner if maxIdleTime set to less than maxLifetime
The existing implementation wouldn't wake the connection cleaner if
maxIdleTime was set to a value less than maxLifetime while an existing
connection was open - resulting in idle connections not being discarded
until after the first maxLifetime had passed.

Fixes #45993

Change-Id: I074ed7ba9803354c8b3a41f2625ae0d8a7d5059b
GitHub-Last-Rev: 0d149d8d38
GitHub-Pull-Request: golang/go#58490
Reviewed-on: https://go-review.googlesource.com/c/go/+/467655
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2025-04-16 22:57:52 -07:00
..
driver database/sql/driver: fix name in comment 2024-07-11 15:01:00 +00:00
convert.go database/sql: allocate once when assigning a time.Time to a byte slice 2024-10-29 11:38:05 +00:00
convert_test.go all: skip and fix various tests with -asan and -msan 2024-10-28 21:04:51 +00:00
ctxutil.go
doc.txt database/sql: fix typo in comment 2024-03-22 06:48:08 +00:00
example_cli_test.go all: fix some lint issues 2022-05-08 17:27:54 +00:00
example_service_test.go database/sql: add error check 2024-02-28 20:21:26 +00:00
example_test.go
fakedb_test.go database/sql: use slices to simplify the code 2024-04-01 12:38:07 +00:00
sql.go database/sql: wake cleaner if maxIdleTime set to less than maxLifetime 2025-04-16 22:57:52 -07:00
sql_test.go database/sql: use t.Context in tests 2025-02-10 12:34:55 -08:00