From f5a78f1c5fde35e522ccd9db4f8ef0eea66fe965 Mon Sep 17 00:00:00 2001 From: Reinhard Vicinus Date: Wed, 11 Dec 2013 13:15:21 +0100 Subject: [PATCH] mysql_grant bugfix: on table *.* SHOW GRANT can return 'WITH MAX_QUERIES_PER_HOUR' which breaks the captures on the match --- lib/puppet/provider/mysql_grant/mysql.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/mysql_grant/mysql.rb b/lib/puppet/provider/mysql_grant/mysql.rb index c633216..2460174 100644 --- a/lib/puppet/provider/mysql_grant/mysql.rb +++ b/lib/puppet/provider/mysql_grant/mysql.rb @@ -22,7 +22,7 @@ Puppet::Type.type(:mysql_grant).provide(:mysql, :parent => Puppet::Provider::Mys priv == 'ALL PRIVILEGES' ? 'ALL' : priv.lstrip.rstrip end # Same here, but to remove OPTION leaving just GRANT. - options = rest.match(/WITH\s(.*)\sOPTION$/).captures if rest.include?('WITH') + options = ['GRANT'] if rest.match(/WITH\sGRANT\sOPTION/) # We need to return an array of instances so capture these instances << new( :name => "#{user}@#{host}/#{table}",