Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database/sql: connection reuse unexpected #23396

Closed
zhouchengxiang opened this issue Jan 10, 2018 · 1 comment
Closed

database/sql: connection reuse unexpected #23396

zhouchengxiang opened this issue Jan 10, 2018 · 1 comment

Comments

@zhouchengxiang
Copy link

zhouchengxiang commented Jan 10, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.9.2

Does this issue reproduce with the latest release?

No

What operating system and processor architecture are you using (go env)?

GOARCH="386"
GOBIN=""
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/workspace/go"
GORACE=""
GOROOT="/usr/local/go1.9"
GOTOOLDIR="/usr/local/go1.9/pkg/tool/linux_386"
GCCGO="gccgo"
GO386="sse2"
CC="gcc"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build208949851=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

conn, err := DB.Conn(context.Background())

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

when the life time expired, conn should created correctly

What did you see instead?

get ErrBadConn

@davecheney
Copy link
Contributor

I'm sorry, you have not included enough information in this report to reproduce the problem. I strongly suggest asking a question on one of the support forums, https://golang.org/wiki/Questions for good places to ask questions. Iff it turns out there is a bug in Go they will direct you to raise an issue. You may reference this issue if it helps.

@mikioh mikioh changed the title database connectoion reuse unexpected database/sql: connection reuse unexpected Jan 13, 2018
@golang golang locked and limited conversation to collaborators Jan 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants