diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index 389213d68..6e1caf2cd 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -101,16 +101,16 @@ def self.mysql_caller(text_of_sql, type) if type.eql? 'system' if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf") ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf" - mysql_raw([system_database, '-e', text_of_sql].flatten.compact) + mysql_raw([system_database, '-e', text_of_sql].flatten.compact).scrub else - mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact) + mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact).scrub end elsif type.eql? 'regular' if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf") ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf" - mysql_raw(['-NBe', text_of_sql].flatten.compact) + mysql_raw(['-NBe', text_of_sql].flatten.compact).scrub else - mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact) + mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact).scrub end else raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: type })