Skip to content

Commit 937d044

Browse files
Merge pull request #1315 from elmobp/master
Remove non printable characters
2 parents 802a291 + 5a45f02 commit 937d044

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/puppet/provider/mysql.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ def self.mysql_caller(text_of_sql, type)
101101
if type.eql? 'system'
102102
if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf")
103103
ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf"
104-
mysql_raw([system_database, '-e', text_of_sql].flatten.compact)
104+
mysql_raw([system_database, '-e', text_of_sql].flatten.compact).scrub
105105
else
106-
mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact)
106+
mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact).scrub
107107
end
108108
elsif type.eql? 'regular'
109109
if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf")
110110
ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf"
111-
mysql_raw(['-NBe', text_of_sql].flatten.compact)
111+
mysql_raw(['-NBe', text_of_sql].flatten.compact).scrub
112112
else
113-
mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact)
113+
mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact).scrub
114114
end
115115
else
116116
raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: type })

0 commit comments

Comments
 (0)