Explorar o código

implement SessionResetter (#779)

Ichinose Shogo %!s(int64=7) %!d(string=hai) anos
pai
achega
92a288d242
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      connection_go18.go

+ 9 - 0
connection_go18.go

@@ -200,3 +200,12 @@ func (mc *mysqlConn) CheckNamedValue(nv *driver.NamedValue) (err error) {
 	nv.Value, err = converter{}.ConvertValue(nv.Value)
 	return
 }
+
+// ResetSession implements driver.SessionResetter.
+// (From Go 1.10)
+func (mc *mysqlConn) ResetSession(ctx context.Context) error {
+	if mc.closed.IsSet() {
+		return driver.ErrBadConn
+	}
+	return nil
+}