File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,12 @@ type mysqlStmt struct {
2424
2525func  (stmt  * mysqlStmt ) Close () error  {
2626	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 
3233	}
3334
3435	err  :=  stmt .mc .writeCommandPacketUint32 (comStmtClose , stmt .id )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments