File tree 1 file changed +4
-2
lines changed
lib/puppet/provider/mysql_grant
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,15 @@ def revoke(user, table)
89
89
user_string = self . class . cmd_user ( user )
90
90
table_string = self . class . cmd_table ( table )
91
91
92
- query = "REVOKE ALL ON #{ table_string } FROM #{ user_string } "
93
- mysql ( [ defaults_file , '-e' , query ] . compact )
94
92
# revoke grant option needs to be a extra query, because
95
93
# "REVOKE ALL PRIVILEGES, GRANT OPTION [..]" is only valid mysql syntax
96
94
# if no ON clause is used.
95
+ # It hast to be executed before "REVOKE ALL [..]" since a GRANT has to
96
+ # exist to be executed successfully
97
97
query = "REVOKE GRANT OPTION ON #{ table_string } FROM #{ user_string } "
98
98
mysql ( [ defaults_file , '-e' , query ] . compact )
99
+ query = "REVOKE ALL ON #{ table_string } FROM #{ user_string } "
100
+ mysql ( [ defaults_file , '-e' , query ] . compact )
99
101
end
100
102
101
103
def destroy
You can’t perform that action at this time.
0 commit comments