X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/a439230240ac55952f5bbf40312c3116674a9cd5..8df838bf09d95282ba29ddde8b504e0affc5f06e:/cookbooks/mysql/libraries/mysql.rb diff --git a/cookbooks/mysql/libraries/mysql.rb b/cookbooks/mysql/libraries/mysql.rb index dc692a780..7c45022fd 100644 --- a/cookbooks/mysql/libraries/mysql.rb +++ b/cookbooks/mysql/libraries/mysql.rb @@ -55,7 +55,7 @@ class Chef def query(sql, options = {}) # Run the query - result = execute(options.merge(:command => sql, :xml => :true)) + result = execute(options.merge(:command => sql, :xml => true)) # Parse the output document = REXML::Document.new(result.stdout) @@ -119,7 +119,7 @@ class Chef def canonicalise_user(user) local, host = user.split("@") - host = "%" unless host + host ||= "%" local = "'#{local}'" unless local =~ /^'.*'$/ host = "'#{host}'" unless host =~ /^'.*'$/