Skip to content

MODULES-2650 Add support for renamed password column #760

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

roman-mueller
Copy link

No description provided.

@igalic
Copy link
Contributor

igalic commented Sep 30, 2015

@roman-mueller, i realize there's an associated ticket, but would you mind elaborating a bit more on the motivation and the nature of the fix in your commit message?

@roman-mueller
Copy link
Author

@igalic sure.
With MySQL 5.7.6 the "password" column has been renamed to "authentication_string".
See: https://dev.mysql.com/doc/refman/5.7/en/upgrading-from-previous-series.html

Due to this, the query to fetch the password and verify that it is the correct one for this user fails.
This pull request fixes this in a backwards compatible manner:
It will SELECT authentication_string AS password only if the version is 5.7.6 or greater.
If a smaller version is used it will SELECT password like before.

@igalic
Copy link
Contributor

igalic commented Sep 30, 2015

@roman-mueller i actually meant git commit --amend the commit message ;)

The password column has been renamed to authentication_string in MySQL >=5.7.6.
By using: SELECT /*!50706 AUTHENTICATION_STRING AS */ PASSWORD the query will
continue to work in older versions as well as newer ones.
@roman-mueller roman-mueller force-pushed the MODULES/2650_add_support_for_authentication_string branch from e2cb14a to afddc3f Compare September 30, 2015 17:03
@roman-mueller
Copy link
Author

@igalic I must have missed that part, sorry about that :)

igalic added a commit that referenced this pull request Oct 1, 2015
…or_authentication_string

MODULES-2650 Add support for renamed password column
@igalic igalic merged commit 2a86934 into puppetlabs:master Oct 1, 2015
@igalic
Copy link
Contributor

igalic commented Oct 1, 2015

thank you @roman-mueller!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants