-
Notifications
You must be signed in to change notification settings - Fork 794
Default mysqld_type should be "mysql" #824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Default mysqld_type return value should be "mysql" if another type is not detected. Returning nil breaks mysql 5.7.11 on Ubuntu (at least) due to the conditional used in mysql_user provider.
What is the version string for mysql on Ubuntu? |
mysqld Ver 5.7.11-0ubuntu6 for Linux on x86_64 ((Ubuntu)) |
@@ -24,7 +24,7 @@ def self.mysqld_type | |||
mysqld_version_string.scan(/mariadb/i) { return "mariadb" } | |||
mysqld_version_string.scan(/\s\(mysql/i) { return "mysql" } | |||
mysqld_version_string.scan(/\s\(percona/i) { return "percona" } | |||
nil | |||
return "mysql" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to match on what we know instead of assuming everything is "mysql"
add this above the nil
instead
mysqld_version_string.scan(/\s\(\(ubuntu/i) { return "mysql" }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. This is the mysql module, after all. mysql should be the default. Why nil? There are Ubuntu packages out there for mariadb as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's nil specifically for catching unhandled cases instead of propagating incorrectly handled cases. Fail-fast style.
Anyway, I think I agree with @solomonty that if ((Ubuntu))
is the moniker that Ubuntu packagers have chosen to mark their packages with, we can only follow suit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds OK in theory, but it only works if it is caught where it is used. It is most definitely not caught in the mysql_user provider.
I feel that mariadb and percona are the special cases that need to be trapped, not mysql. If there is a "mysqld" executable, it should be assumed to actually be mysql unless a special case is detected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable.
I have the some problem on Ubuntu Xenial. |
Default mysqld_type return value should be "mysql" if another type is not detected. Returning nil breaks mysql 5.7.11 on Ubuntu (at least) due to the conditional used in mysql_user provider.