From cdd6c9f52ec8e4969a76429fcc33b5e4a0ac4b5f Mon Sep 17 00:00:00 2001 From: Praveen raj Mani Date: Fri, 5 Jun 2020 04:41:42 +0530 Subject: [PATCH] Update go-sql-driver pkg to support `checkConnLiveness` (#9766) Fixes #9679 --- go.mod | 2 +- go.sum | 2 ++ pkg/event/target/mysql.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 206037fed..be709bf9a 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/fatih/structs v1.1.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect github.com/go-ole/go-ole v1.2.4 // indirect - github.com/go-sql-driver/mysql v1.4.1 + github.com/go-sql-driver/mysql v1.5.0 github.com/gogo/protobuf v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect github.com/gomodule/redigo v2.0.0+incompatible diff --git a/go.sum b/go.sum index 95089c5ab..f852d658d 100644 --- a/go.sum +++ b/go.sum @@ -110,6 +110,8 @@ github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= diff --git a/pkg/event/target/mysql.go b/pkg/event/target/mysql.go index e8bd22c8a..969697eae 100644 --- a/pkg/event/target/mysql.go +++ b/pkg/event/target/mysql.go @@ -364,6 +364,7 @@ func NewMySQLTarget(id string, args MySQLArgs, doneCh <-chan struct{}, loggerOnc Addr: args.Host.String() + ":" + args.Port, DBName: args.Database, AllowNativePasswords: true, + CheckConnLiveness: true, } args.DSN = config.FormatDSN()