Skip to content

Commit 6a94f65

Browse files
author
Shlomi Noach
authored
Merge pull request #633 from heng4fun/master
Support database with underscore
2 parents 17233fc + 419794e commit 6a94f65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/logic/inspect.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ func (this *Inspector) validateGrants() error {
232232
if strings.Contains(grant, fmt.Sprintf("GRANT ALL PRIVILEGES ON `%s`.*", this.migrationContext.DatabaseName)) {
233233
foundDBAll = true
234234
}
235+
if strings.Contains(grant, fmt.Sprintf("GRANT ALL PRIVILEGES ON `%s`.*", strings.Replace(this.migrationContext.DatabaseName, "_", "\\_", -1))) {
236+
foundDBAll = true
237+
}
235238
if base.StringContainsAll(grant, `ALTER`, `CREATE`, `DELETE`, `DROP`, `INDEX`, `INSERT`, `LOCK TABLES`, `SELECT`, `TRIGGER`, `UPDATE`, ` ON *.*`) {
236239
foundDBAll = true
237240
}

0 commit comments

Comments
 (0)