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

Commit

Permalink
Merge pull request #28 from winebarrel/fix_for_procedure_privs
Browse files Browse the repository at this point in the history
Fix for procedure privs
  • Loading branch information
winebarrel authored Apr 9, 2021
2 parents 2d1c71f + e6641ca commit 25a64c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mysql/resource_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ func flattenList(list []interface{}, template string) string {

func formatDatabaseName(database string) string {
if strings.Compare(database, "*") != 0 && !strings.HasSuffix(database, "`") {
return fmt.Sprintf("`%s`", database)
database = fmt.Sprintf("`%s`", database)

if strings.HasPrefix(database, "`PROCEDURE ") {
database = strings.Replace(database, "`PROCEDURE ", "PROCEDURE `", 1)
}
}

return database
Expand Down

0 comments on commit 25a64c3

Please sign in to comment.