We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c8d6a5 commit 563316cCopy full SHA for 563316c
statement.go
@@ -24,11 +24,12 @@ type mysqlStmt struct {
24
25
func (stmt *mysqlStmt) Close() error {
26
if stmt.mc == nil || stmt.mc.closed.Load() {
27
- // driver.Stmt.Close can be called more than once, thus this function
28
- // has to be idempotent.
29
- // See also Issue #450 and golang/go#16019.
30
- //errLog.Print(ErrInvalidConn)
31
- return driver.ErrBadConn
+ // driver.Stmt.Close could be called more than once, thus this function
+ // had to be idempotent. See also Issue #450 and golang/go#16019.
+ // This bug has been fixed in Go 1.8.
+ // https://github.com/golang/go/commit/90b8a0ca2d0b565c7c7199ffcf77b15ea6b6db3a
+ // But we keep this function idempotent because it is safer.
32
+ return nil
33
}
34
35
err := stmt.mc.writeCommandPacketUint32(comStmtClose, stmt.id)
0 commit comments