Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Error check
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmaanT committed Feb 26, 2020
1 parent 3630c16 commit fe31829
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mysql/resource_user_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func SetUserPassword(d *schema.ResourceData, meta interface{}) error {

/* ALTER USER syntax introduced in MySQL 5.7.6 deprecates SET PASSWORD (GH-8230) */
serverVersion, err := serverVersion(db)
if err != nil {
return fmt.Errorf("Could not determine server version: %s", err)
}
ver, _ := version.NewVersion("5.7.6")
var stmtSQL string
if serverVersion.LessThan(ver) {
Expand Down

0 comments on commit fe31829

Please sign in to comment.