]> Cypherpunks repositories - gostls13.git/commit
database/sql: fail on unsupported options when context is un-cancellable
authorMatt Dee <mdee@hioscar.com>
Tue, 8 Aug 2017 19:58:27 +0000 (15:58 -0400)
committerDaniel Theophanes <kardianos@gmail.com>
Wed, 9 Aug 2017 20:06:20 +0000 (20:06 +0000)
commitbd08803680792b553dc78d5b5006ebedadaaccf0
tree1a45005de948b3f27af29b899a9b4dcd31ab2db4
parentd401c427b29f48d5cbc5092e62c20aa8524ce356
database/sql: fail on unsupported options when context is un-cancellable

Currently, the check for `ctx.Done() == context.Background().Done()`
comes before the check to see if we are ignoring any options.  That
check should be done earlier, so that the options are not silently
ignored.

Fixes #21350

Change-Id: I3704e4209854c7d99f3f92498bae831cabc7e419
Reviewed-on: https://go-review.googlesource.com/53970
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/database/sql/ctxutil.go
src/database/sql/sql_test.go