Skip to content

Commit

Permalink
Merge pull request #633 from heng4fun/master
Browse files Browse the repository at this point in the history
Support database with underscore
  • Loading branch information
Shlomi Noach committed Dec 25, 2018
2 parents 17233fc + 419794e commit 6a94f65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/logic/inspect.go
Expand Up @@ -232,6 +232,9 @@ func (this *Inspector) validateGrants() error {
if strings.Contains(grant, fmt.Sprintf("GRANT ALL PRIVILEGES ON `%s`.*", this.migrationContext.DatabaseName)) {
foundDBAll = true
}
if strings.Contains(grant, fmt.Sprintf("GRANT ALL PRIVILEGES ON `%s`.*", strings.Replace(this.migrationContext.DatabaseName, "_", "\\_", -1))) {
foundDBAll = true
}
if base.StringContainsAll(grant, `ALTER`, `CREATE`, `DELETE`, `DROP`, `INDEX`, `INSERT`, `LOCK TABLES`, `SELECT`, `TRIGGER`, `UPDATE`, ` ON *.*`) {
foundDBAll = true
}
Expand Down

0 comments on commit 6a94f65

Please sign in to comment.