Merge pull request #481 from github/autocommit

gh-ost uses autocommit=1 for all connections
This commit is contained in:
Shlomi Noach 2017-09-03 07:58:57 +03:00 committed by GitHub
commit ed0fc1c7b9

View File

@ -56,5 +56,5 @@ func (this *ConnectionConfig) GetDBUri(databaseName string) string {
// Wrap IPv6 literals in square brackets // Wrap IPv6 literals in square brackets
hostname = fmt.Sprintf("[%s]", hostname) 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)
} }