From a3593df0998206a7c75b2d0ee59cd192d73e4d89 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 7 Apr 2018 16:51:10 +0900 Subject: [PATCH 1/2] implement SessionResetter. --- connection_go18.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/connection_go18.go b/connection_go18.go index 1306b70b7..90a12c603 100644 --- a/connection_go18.go +++ b/connection_go18.go @@ -200,3 +200,13 @@ 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() { + errLog.Print(ErrInvalidConn) + return driver.ErrBadConn + } + return nil +} From 747d7120b92bf61324a98dc51c289245bd181f99 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Tue, 17 Apr 2018 15:59:30 +0900 Subject: [PATCH 2/2] remove unhelpful log --- connection_go18.go | 1 - 1 file changed, 1 deletion(-) diff --git a/connection_go18.go b/connection_go18.go index 90a12c603..474ea227f 100644 --- a/connection_go18.go +++ b/connection_go18.go @@ -205,7 +205,6 @@ func (mc *mysqlConn) CheckNamedValue(nv *driver.NamedValue) (err error) { // (From Go 1.10) func (mc *mysqlConn) ResetSession(ctx context.Context) error { if mc.closed.IsSet() { - errLog.Print(ErrInvalidConn) return driver.ErrBadConn } return nil