Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/puppet/provider/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ def mysqld_type
def self.mysqld_version_string
# As the possibility of the mysqld being remote we need to allow the version string to be overridden,
# this can be done by facter.value as seen below. In the case that it has not been set and the facter
# value is nil we use an empty string so that default client/service are used.
@mysqld_version_string ||= Facter.value(:mysqld_version) || ''
# value is nil we use the mariadbd or mysql command to ensure we report the correct version of engine
# for later use cases.
@mysqld_version_string ||= Facter.value(:mysqld_version) || version_raw
end

def self.version_raw
# get either version of mariadb or mysql
`mariadbd -V`
rescue
`mysqld -V`
end

def mysqld_version_string
Expand Down
Loading