You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used a sql.DB whose driver does not implement ConnBeginTx (in my case, an outdated version of pq), and begun a transaction with db.BeginTx(context.TODO, &sql.TxOptions{ReadOnly: true}).
What did you expect to see?
I expected to see an error, since the driver does not support controlling ReadOnly or Isolation
What did you see instead?
This successfully opens a transaction which is not readonly. Similarly, any isolation levels will be ignored.
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mdee/data/go_third_party_local:/Users/mdee/data/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rp/m0d1xlms1ts618xx3x1vgjp80000gp/T/go-build670327831=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
Used a
sql.DB
whose driver does not implementConnBeginTx
(in my case, an outdated version ofpq
), and begun a transaction withdb.BeginTx(context.TODO, &sql.TxOptions{ReadOnly: true})
.What did you expect to see?
I expected to see an error, since the driver does not support controlling
ReadOnly
orIsolation
What did you see instead?
This successfully opens a transaction which is not readonly. Similarly, any isolation levels will be ignored.
The text was updated successfully, but these errors were encountered: