MCPcopy
hub / github.com/go-sql-driver/mysql / markBadConn

Method markBadConn

connection.go:131–136  ·  view source on GitHub ↗

markBadConn replaces errBadConnNoWrite with driver.ErrBadConn. This function is used to return driver.ErrBadConn only when safe to retry.

(err error)

Source from the content-addressed store, hash-verified

129// markBadConn replaces errBadConnNoWrite with driver.ErrBadConn.
130// This function is used to return driver.ErrBadConn only when safe to retry.
131func (mc *mysqlConn) markBadConn(err error) error {
132 if err == errBadConnNoWrite {
133 return driver.ErrBadConn
134 }
135 return err
136}
137
138func (mc *mysqlConn) Begin() (driver.Tx, error) {
139 return mc.begin(false)

Callers 7

beginMethod · 0.95
ExecMethod · 0.95
execMethod · 0.95
queryMethod · 0.95
PingMethod · 0.95
ExecMethod · 0.80
queryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected