fix: mysql WithAcceptable bug (#3986)

This commit is contained in:
MarkJoyMa
2024-03-08 12:23:41 +08:00
committed by GitHub
parent 2207477b60
commit c7dacb0146
4 changed files with 50 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ const (
// NewMysql returns a mysql connection.
func NewMysql(datasource string, opts ...SqlOption) SqlConn {
opts = append(opts, withMysqlAcceptable())
opts = append([]SqlOption{withMysqlAcceptable()}, opts...)
return NewSqlConn(mysqlDriverName, datasource, opts...)
}