-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix #167 #168
Fix #167 #168
Conversation
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 58.40% 58.34% -0.07%
==========================================
Files 10 10
Lines 952 953 +1
==========================================
Hits 556 556
- Misses 396 397 +1
Continue to review full report at Codecov.
|
src/MySQL.jl
Outdated
@@ -249,6 +284,7 @@ Connect to a MySQL database with provided `host`, `user`, and `passwd` positiona | |||
* `option_file::String`: the argument is interpreted as a path to a custom option file, and only that option file is read. | |||
* `read_default_group::Bool`: only the default option groups are read from specified option file(s) | |||
* `option_group::String`: it is interpreted as a custom option group, and that custom option group is read in addition to the default option groups. | |||
* `enable_cleartext_plugin::Bool`: This option is supported to be compatible with MySQL client libraries. MySQL client libraries use this option to determine whether the mysql_clear_password authentication plugin can be used. |
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.
Here's the mariadb docs as to why I didn't originally include this option:
For MySQL compatibility, MariaDB Connector/C also allows applications to set the MYSQL_ENABLE_CLEARTEXT_PLUGIN option with the mysql_optionsv function. However, this option does not actually do anything in MariaDB Connector/C, because the mysql_clear_password client authentication plugin is always enabled for MariaDB clients and client libraries.
So yeah, I don't really mind including it here, but it sounds like it doesn't really do anything w/ mariadb client (which MySQL.jl uses under the hood)
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.
@quinnj Got it, thank you! I'd thought adding it was what made my use case work, but it must have been something else -- I just tried without the option and it did work. Removing the extra code here.
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.
Thanks so much!
Thanks for maintaining this package!
This pull request does
two thingsone thing:if ... elseif ... end
block inMySQL.setoptions!
to multiple independentif ... end
blocks.2. (Commits 2-3) Add a keyword argument tosetoptions!
for theenable_cleartext_plugin
option (already supported behind the scenes via the existingAPI.MYSQL_ENABLE_CLEARTEXT_PLUGIN
enum value). Let me know if you'd prefer this be a separate PR -- it was something I need for my use case and while I was inside thesetoptions!
function I thought I'd add it. (Also added a line documenting this to the DBInterface.connect docstring.)-Alex