-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
The mysql version check inverted #51240
The mysql version check inverted #51240
Conversation
is greater than or equal to 8.0.11 was testing for less than or equal to 8.0.11. This then used the password(_) function in the incorrect context.
This was supposed to go in against tag 2018.3.3. I'm not sure what went wrong. Selecting the tag on the pull request screen sent me into a code comparison mode. |
I've added support for the official mysql 8.0 packages and the relevant repositories. Package names are mysql-community-server and mysql-community-client. I know the repo setting breaks convention a bit but it is compulsory so I'm not sure how else to properly include it. This change requires the salt pull request I created saltstack/salt#51240 to be able to grant users.
salt/modules/mysql.py
Outdated
@@ -1242,7 +1242,7 @@ def user_exists(user, | |||
else: | |||
qry += ' AND ' + password_column + ' = \'\'' | |||
elif password: | |||
if salt.utils.versions.version_cmp(server_version, '8.0.11') <= 0: | |||
if salt.utils.versions.version_cmp(server_version, '8.0.11') >= 0: |
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.
what about salt.utils.versions.LooseVersion(server_version) >= '8.0.11'
@waynegemmell Looks like your local branch was against |
Looking closer at the code already committed, this was fixed in #49918. |
The mysql version check that was supposed to test whether the version is greater than or equal to 8.0.11 was testing for less than or equal to 8.0.11. This then used the password(_) function in the incorrect context.
Tests written?
No
Commits signed with GPG?
No