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: investigate why TestIssue18719 requires closing rows before db close #19058

Closed
kardianos opened this issue Feb 13, 2017 · 2 comments
Closed
Assignees
Milestone

Comments

@kardianos
Copy link
Contributor

@kardianos kardianos commented Feb 13, 2017

TestIssue18719 requires waiting for all the rows to close before closing the database. Otherwise the test will fail with: Error closing fakeConn: can't close; dangling statement(s).

I have no reason to believe this was introduced in go1.8. However it should be investigated and determined if this is a bug of some type of an intended behavior.

@kardianos kardianos added this to the Go1.9 milestone Feb 13, 2017
@kardianos kardianos self-assigned this Feb 13, 2017
@kardianos
Copy link
Contributor Author

@kardianos kardianos commented Apr 7, 2017

I diagnosed this. The tx.closemu RLock needs to be held until the rows connection is "released". CL pending.

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 12, 2017

CL https://golang.org/cl/40400 mentions this issue.

@gopherbot gopherbot closed this in dec95d8 Apr 12, 2017
lparth added a commit to lparth/go that referenced this issue Apr 13, 2017
When a Tx starts a query, prevent returning the connection to the pool
until after the query finishes.

Fixes golang#19058

Change-Id: I2c0480d9cca9eeb173b5b3441a5aeed6f527e0ac
Reviewed-on: https://go-review.googlesource.com/40400
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Apr 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.