Skip to content

Commit 21ea307

Browse files
committed
Add ^ when matching mysql output
Since Ubuntu 16.04 LTS requires that MySQL type detection works, due to changes in MySQL 5.7, change the regular expression checked against mysqld -V output to also match ^mysql.
1 parent 2603411 commit 21ea307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/mysql.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def self.defaults_file
2222
def self.mysqld_type
2323
# find the mysql "dialect" like mariadb / mysql etc.
2424
mysqld_version_string.scan(/mariadb/i) { return "mariadb" }
25-
mysqld_version_string.scan(/\s\(mysql/i) { return "mysql" }
25+
mysqld_version_string.scan(/(\s\(|^)mysql/i) { return "mysql" }
2626
mysqld_version_string.scan(/\s\(percona/i) { return "percona" }
2727
return "mysql"
2828
end

0 commit comments

Comments
 (0)