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: last connection in pool not handed out correctly #7219

Closed
bradfitz opened this issue Jan 27, 2014 · 1 comment
Closed

database/sql: last connection in pool not handed out correctly #7219

bradfitz opened this issue Jan 27, 2014 · 1 comment

Comments

@bradfitz
Copy link
Contributor

From golang-dev:

"Hi,

If you run this code http://play.golang.org/p/CjkzvJYpUi it will block forever on the
second time through the for loop. Change SetMaxIdleConns to 0 and it works.

Problem happens with either MySQL database driver, and with both db.Query()/Next/Close
and db.QueryRow().Scan(). Is it a bug? Could someone help me understand?

Thanks!
"

Reply:

"It's a known bug in Go 1.2, fixed in 1.3 via commit 8a7ac002f840."

Which is:
https://golang.org/cl/40410043

Maybe a candidate for Go 1.2.1?
@rsc
Copy link
Contributor

rsc commented Feb 16, 2014

Comment 1:

Okay for Go 1.2.1.
My reasoning is that people cannot easily make a copy of database/sql because other code
they want to use (the drivers) depends on using database/sql, so you'd have to fork
database/sql, database/sql/driver, and the actual driver, just to get a 1-line fix for a
bug that makes database/sql wedge.

@bradfitz bradfitz self-assigned this Feb 16, 2014
@rsc rsc added this to the Go1.2.1 milestone Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
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