Skip to content

Commit

Permalink
revert Prepare change
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed May 18, 2024
1 parent f554b55 commit 8ae0ee5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ func (mc *mysqlConn) Prepare(query string) (driver.Stmt, error) {
// Send command
err := mc.writeCommandPacketStr(comStmtPrepare, query)
if err != nil {
return nil, err
// STMT_PREPARE is safe to retry. So we can return ErrBadConn here.
mc.log(err)
return nil, driver.ErrBadConn
}

stmt := &mysqlStmt{
Expand Down

0 comments on commit 8ae0ee5

Please sign in to comment.