go/src/database/sql/driver
Daniel Theophanes 0d163ce1c9 database/sql: do not bypass the driver locks with Context methods
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/32422
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-29 18:52:38 +00:00
..
driver.go database/sql: do not bypass the driver locks with Context methods 2016-11-29 18:52:38 +00:00
types.go database/sql: additional underlying types in DefaultValueConverter 2016-11-17 00:09:27 +00:00
types_test.go database/sql: additional underlying types in DefaultValueConverter 2016-11-17 00:09:27 +00:00