• Daniel Theophanes's avatar
    database/sql: do not bypass the driver locks with Context methods · 0d163ce1
    Daniel Theophanes authored
    When context methods were initially added it was attempted to unify
    behavior between drivers without Context methods and those with
    Context methods to always return right away when the Context expired.
    However in doing so the driver call could be executed outside of the
    scope of the driver connection lock and thus bypassing thread safety.
    
    The new behavior waits until the driver operation is complete. It then
    checks to see if the context has expired and if so returns that error.
    
    Change-Id: I4a5c7c3263420c57778f36a5ed6fa0ef8cb32b20
    Reviewed-on: https://go-review.googlesource.com/32422Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    0d163ce1
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...