-
Notifications
You must be signed in to change notification settings - Fork 18k
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: Strange Errors when Closing a Tx's Prepared Statement after Commit #4459
Labels
Milestone
Comments
Owner changed to @bradfitz. Status changed to Accepted. |
Hello, For the sqlite driver, I've found where the issue comes from: The prepared statements are closed twice: - when the Tx is committed, the underlying conn is closed and the sqlite driver tries to close dangling statements, - with the deferred Stmt.Close. Just comment out the following block in the sqlite driver to do a quick and dirty fix: func (c *SQLiteConn) Close() error { /*s := C.sqlite3_next_stmt(c.db, nil) for s != nil { C.sqlite3_finalize(s) s = C.sqlite3_next_stmt(c.db, s) }*/ rv := C.sqlite3_close(c.db) I will attempt to fix the driver. Regards. |
Ok, I've just submitted a patch to mattn that fix the issue on the driver side: mattn/go-sqlite3#37 For postgresql, I don't have it installed. If you ask me, I can install it and investigate... Regards. |
Comment 12 by marko@joh.to: This should be fixed in 1.4 by https://code.google.com/p/go/source/detail?r=50ce4ec65c4a. |
https://codereview.appspot.com/131650043 should be closed? |
/cc @kardianos |
I'll look into it. |
Yes, this could be closed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
by johnkgallagher:
The text was updated successfully, but these errors were encountered: