Fix appending multiStatements=true parameter for mysql driver

This commit is contained in:
Julius Kriukas 2017-04-25 22:54:16 +03:00
parent 5c8da71dea
commit 14f784961f
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ func (m *Mysql) Open(url string) (database.Driver, error) {
return nil, err
}
purl.Query().Set("multiStatements", "true")
q := purl.Query()
q.Set("multiStatements", "true")
purl.RawQuery = q.Encode()
db, err := sql.Open("mysql", strings.Replace(
migrate.FilterCustomQuery(purl).String(), "mysql://", "", 1))