Skip to content
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

Support connect attributes and set the script name to program_name attribute if it is not specified. #760

Closed
wants to merge 1 commit into from

Conversation

kubo
Copy link
Contributor

@kubo kubo commented Jun 11, 2016

This is same feature with Perl DBD-MySQL mysql_conn_attrs option.
http://search.cpan.org/~capttofu/DBD-mysql-4.033/lib/DBD/mysql.pm#mysql_conn_attrs

@@ -352,7 +352,36 @@ static VALUE rb_mysql_get_ssl_cipher(VALUE self)
return rb_str;
}

static VALUE rb_connect(VALUE self, VALUE user, VALUE pass, VALUE host, VALUE port, VALUE database, VALUE socket, VALUE flags) {
#if MYSQL_VERSION_ID >= 50606
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer a have-function test on mysql_options4 rather than a version check.

@sodabrew
Copy link
Collaborator

This looks awesome, thank you for the contribution! Review comments added.

@sodabrew sodabrew added this to the 0.5.0 milestone Jun 11, 2016
@kubo
Copy link
Contributor Author

kubo commented Jun 11, 2016

I changed the code as you commented.

sodabrew pushed a commit to sodabrew/mysql2 that referenced this pull request Nov 25, 2017
sodabrew pushed a commit to sodabrew/mysql2 that referenced this pull request Nov 25, 2017
sodabrew pushed a commit to sodabrew/mysql2 that referenced this pull request Nov 25, 2017
sodabrew pushed a commit to sodabrew/mysql2 that referenced this pull request Nov 25, 2017
@sodabrew
Copy link
Collaborator

sodabrew commented Nov 25, 2017

Merged as 8d557b0

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

Successfully merging this pull request may close these issues.

2 participants