Skip to content

Commit

Permalink
fix interpolateParams
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed May 18, 2024
1 parent db0cc0e commit 20c8f2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ func (mc *mysqlConn) interpolateParams(query string, args []driver.Value) (strin
if err != nil {
// can not take the buffer. Something must be wrong with the connection
mc.cleanup()
return "", err
// interpolateParams would be called before sending any query.
// So its safe to retry.
mc.log(err)
return "", driver.ErrBadConn
}
buf = buf[:0]
argPos := 0
Expand Down

0 comments on commit 20c8f2d

Please sign in to comment.