From 10cafb71c0852d51ea36adf90bf7c5fa70887ae7 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Wed, 30 Aug 2017 11:38:22 +0300 Subject: [PATCH] gh-ost uses autocommit=1 for all connections --- go/mysql/connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/mysql/connection.go b/go/mysql/connection.go index 5b1830b..96ae08b 100644 --- a/go/mysql/connection.go +++ b/go/mysql/connection.go @@ -56,5 +56,5 @@ func (this *ConnectionConfig) GetDBUri(databaseName string) string { // Wrap IPv6 literals in square brackets hostname = fmt.Sprintf("[%s]", hostname) } - return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?interpolateParams=true&charset=utf8mb4,utf8,latin1", this.User, this.Password, hostname, this.Key.Port, databaseName) + return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?interpolateParams=true&autocommit=true&charset=utf8mb4,utf8,latin1", this.User, this.Password, hostname, this.Key.Port, databaseName) }