diff options
| author | Daniel Theophanes <kardianos@gmail.com> | 2019-01-11 14:20:41 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-01-14 19:44:57 +0000 |
| commit | 70931c087b7ceb660aa969382b8c273efba63426 (patch) | |
| tree | 696cb4d5f7803310e293fca8261c357d1e8c396d /src/encoding/json/encode.go | |
| parent | 4e8aaf6b22557a485cd3af874bf5be2722b07835 (diff) | |
| download | go-70931c087b7ceb660aa969382b8c273efba63426.tar.xz | |
database/sql: fix logic for pulling a Conn from DB
The logic for pulling a database connection from the DB pool should
proceed as follows: attempt to pull either a cached connection or
new connection N times in a loop. If each connection results
in a bad connection, then create a new connection (no cache).
Previously pulling a Conn from the pool, the last step also
looked at the cache, rather then always creating a new connection.
Fixes #29684
Change-Id: I8f436fd9b96eb35502a620ebe8da4ab89fb06a2e
Reviewed-on: https://go-review.googlesource.com/c/157637
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions
