diff --git a/connection.go b/connection.go index 90aec6439..835f89729 100644 --- a/connection.go +++ b/connection.go @@ -642,3 +642,9 @@ func (mc *mysqlConn) ResetSession(ctx context.Context) error { mc.reset = true return nil } + +// IsValid implements driver.Validator interface +// (From Go 1.15) +func (mc *mysqlConn) IsValid() bool { + return !mc.closed.IsSet() +}