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

Commit 25a64c3

Browse files
authored
Merge pull request #28 from winebarrel/fix_for_procedure_privs
Fix for procedure privs
2 parents 2d1c71f + e6641ca commit 25a64c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mysql/resource_grant.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ func flattenList(list []interface{}, template string) string {
110110

111111
func formatDatabaseName(database string) string {
112112
if strings.Compare(database, "*") != 0 && !strings.HasSuffix(database, "`") {
113-
return fmt.Sprintf("`%s`", database)
113+
database = fmt.Sprintf("`%s`", database)
114+
115+
if strings.HasPrefix(database, "`PROCEDURE ") {
116+
database = strings.Replace(database, "`PROCEDURE ", "PROCEDURE `", 1)
117+
}
114118
}
115119

116120
return database

0 commit comments

Comments
 (0)