From e315ee96d0ef8e03a4f70fac132eb7b213ba0302 Mon Sep 17 00:00:00 2001 From: w32-blaster Date: Sun, 10 Nov 2013 18:48:22 +0100 Subject: [PATCH] Changed defaults-file to defaults-extra-file Should load the .my.cnf file with "--defaults-extra-file" instead of "--defaults-file". This is necessary if we have global my.cnf file but we want to use both of them. --- lib/puppet/provider/mysql.rb | 2 +- lib/puppet/provider/mysql_database/mysql.rb | 2 +- lib/puppet/provider/mysql_user/mysql.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index 4645434..98118c2 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -8,7 +8,7 @@ class Puppet::Provider::Mysql < Puppet::Provider # Optional defaults file def self.defaults_file if File.file?("#{Facter.value(:root_home)}/.my.cnf") - "--defaults-file=#{Facter.value(:root_home)}/.my.cnf" + "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" else nil end diff --git a/lib/puppet/provider/mysql_database/mysql.rb b/lib/puppet/provider/mysql_database/mysql.rb index eea0a1b..68f6002 100644 --- a/lib/puppet/provider/mysql_database/mysql.rb +++ b/lib/puppet/provider/mysql_database/mysql.rb @@ -5,7 +5,7 @@ Puppet::Type.type(:mysql_database).provide(:mysql) do def self.defaults_file if File.file?("#{Facter.value(:root_home)}/.my.cnf") - "--defaults-file=#{Facter.value(:root_home)}/.my.cnf" + "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" else nil end diff --git a/lib/puppet/provider/mysql_user/mysql.rb b/lib/puppet/provider/mysql_user/mysql.rb index f05a606..92b475c 100644 --- a/lib/puppet/provider/mysql_user/mysql.rb +++ b/lib/puppet/provider/mysql_user/mysql.rb @@ -7,7 +7,7 @@ Puppet::Type.type(:mysql_user).provide(:mysql, :parent => Puppet::Provider::Mysq # Optional defaults file def self.defaults_file if File.file?("#{Facter.value(:root_home)}/.my.cnf") - "--defaults-file=#{Facter.value(:root_home)}/.my.cnf" + "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" else nil end