You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As define in go/src/database/sql/driver/driver.go:
65// ErrBadConn should be returned by a driver to signal to the sql66// package that a driver.Conn is in a bad state (such as the server67// having earlier closed the connection) and the sql package should68// retry on a new connection.69//70// To prevent duplicate operations, ErrBadConn should NOT be returned71// if there's a possibility that the database server might have72// performed the operation. Even if the server sends back an error,73// you shouldn't return ErrBadConn.74varErrBadConn=errors.New("driver: bad connection")
Issue description
duplicate operations cause by
maxBadConnRetries
cause by read timeout, source code:github.com/go-sql-driver/mysql/packets.go
As define in go/src/database/sql/driver/driver.go:
So, why read timeout return
ErrBadConn
?Example code
Error log
Configuration
Driver git SHA:
147bd02
Go version:
go version go1.8 darwin/amd64
Server version:
mysqld Ver 5.6.28 for Linux on x86_64 (MySQL Community Server (GPL))
Server OS:
Linux kvm36130.sg 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: