Skip to content

Commit 8dd37ae

Browse files
committed
Merge pull request #594 from skroll/escape_backslash
Fix escaped backslashes in grants
2 parents 1494412 + 9dbdd89 commit 8dd37ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/puppet/provider/mysql_grant/mysql.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def self.instances
2929
# Matching: GRANT (SELECT, UPDATE) PRIVILEGES ON (*.*) TO ('root')@('127.0.0.1') (WITH GRANT OPTION)
3030
if match = munged_grant.match(/^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)?$/)
3131
privileges, table, user, host, rest = match.captures
32+
table.gsub!('\\\\', '\\')
33+
3234
# split on ',' if it is not a non-'('-containing string followed by a
3335
# closing parenthesis ')'-char - e.g. only split comma separated elements not in
3436
# parentheses

0 commit comments

Comments
 (0)