Browse Source
Merge pull request #178 from fsdfsffdsf/optimization-db
optimization: reduce network interaction in db request
pull/183/head
yedf2
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
dtmcli/dtmimp/utils.go
|
|
|
@ -196,7 +196,7 @@ func GetDsn(conf DBConf) string { |
|
|
|
host := MayReplaceLocalhost(conf.Host) |
|
|
|
driver := conf.Driver |
|
|
|
dsn := map[string]string{ |
|
|
|
"mysql": fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=Local", |
|
|
|
"mysql": fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=Local&interpolateParams=true", |
|
|
|
conf.User, conf.Password, host, conf.Port, ""), |
|
|
|
"postgres": fmt.Sprintf("host=%s user=%s password=%s dbname='%s' port=%d sslmode=disable", |
|
|
|
host, conf.User, conf.Password, "", conf.Port), |
|
|
|
|