Change ErrUnknownPlugin to a func which can take the plugin name#795
Closed
sjmudd wants to merge 2 commits intogo-sql-driver:masterfrom
Closed
Change ErrUnknownPlugin to a func which can take the plugin name#795sjmudd wants to merge 2 commits intogo-sql-driver:masterfrom
sjmudd wants to merge 2 commits intogo-sql-driver:masterfrom
Conversation
MySQL 8.0 brings a new authentication plugin which is enabled by default. This plugin is not yet handled by the go driver. The error message which is returned is somewhat vague and this is likely to cause confusion. The change provides the same error message but includes the plugin name which will be easier for people to lookup. So rather than returning the error: this authentication plugin is not supported we return something like: authentication plugin "caching_sha2_password" is not supported
Contributor
Author
|
FWIW: noticed when trying to build a new app talking to a local MySQL 8.0.11 GA version. I'd forgotten to change the default plugin to something the go driver understands. |
Member
|
Thank you for this pull request. I agree that the additional information would be helpful, however I still don't think that it would be a good idea to change the current behavior. We exported the If we change |
julienschmidt
added a commit
that referenced
this pull request
May 29, 2018
* log missing auth plugin name * refactor auth handling * auth: fix AllowNativePasswords * auth: remove plugin name print * packets: attempt to fix writePublicKeyAuthPacket * packets: do not NUL-terminate auth switch packets * move handleAuthResult to auth * add old_password auth tests * auth: add empty old_password test * auth: add cleartext auth tests * auth: add native auth tests * auth: add caching_sha2 tests * rename init and auth packets to documented names * auth: fix plugin name for switched auth methods * buffer: optimize default branches * auth: add tests for switch to caching sha2 * auth: add tests for switch to cleartext password * auth: add tests for switch to native password * auth: sync NUL termination with official connectors * packets: handle missing NUL bytes in AuthSwitchRequests Updates #795
julienschmidt
added a commit
that referenced
this pull request
May 31, 2018
* log missing auth plugin name * refactor auth handling * auth: fix AllowNativePasswords * auth: remove plugin name print * packets: attempt to fix writePublicKeyAuthPacket * packets: do not NUL-terminate auth switch packets * move handleAuthResult to auth * add old_password auth tests * auth: add empty old_password test * auth: add cleartext auth tests * auth: add native auth tests * auth: add caching_sha2 tests * rename init and auth packets to documented names * auth: fix plugin name for switched auth methods * buffer: optimize default branches * auth: add tests for switch to caching sha2 * auth: add tests for switch to cleartext password * auth: add tests for switch to native password * auth: sync NUL termination with official connectors * packets: handle missing NUL bytes in AuthSwitchRequests Updates #795
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Change
ErrUnknownPluginto a func which can take the plugin nameMySQL 8.0 brings a new authentication plugin which is enabled by default. This plugin is not yet handled by the go driver.
The error message which is returned is somewhat vague and this is likely to cause confusion.
The change provides the same error message but includes the plugin name which will be easier for people to lookup. So rather than returning the error:
this authentication plugin is not supportedwe return something like:
authentication plugin "caching_sha2_password" is not supportedChecklist