File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,12 @@ type mysqlStmt struct {
24
24
25
25
func (stmt * mysqlStmt ) Close () error {
26
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
27
+ // driver.Stmt.Close could be called more than once, thus this function
28
+ // had to be idempotent. See also Issue #450 and golang/go#16019.
29
+ // This bug has been fixed in Go 1.8.
30
+ // https://github.com/golang/go/commit/90b8a0ca2d0b565c7c7199ffcf77b15ea6b6db3a
31
+ // But we keep this function idempotent because it is safer.
32
+ return nil
32
33
}
33
34
34
35
err := stmt .mc .writeCommandPacketUint32 (comStmtClose , stmt .id )
You can’t perform that action at this time.
0 commit comments