• Daniel Theophanes's avatar
    database/sql: fix logic for pulling a Conn from DB · 70931c08
    Daniel Theophanes authored
    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/157637Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    70931c08
Name
Last commit
Last update
..
driver Loading commit data...
convert.go Loading commit data...
convert_test.go Loading commit data...
ctxutil.go Loading commit data...
doc.txt Loading commit data...
example_cli_test.go Loading commit data...
example_service_test.go Loading commit data...
example_test.go Loading commit data...
fakedb_test.go Loading commit data...
sql.go Loading commit data...
sql_test.go Loading commit data...