-
Notifications
You must be signed in to change notification settings - Fork 549
Issue 233 - Add :local_infile option and refactor mysql_options code #252
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
…method to the class.
README.md
Ping. This is ready to merge please. |
Ping? |
I'm eager for this to go in and can test/verify the fix. I see the issue with homebrew installed mysql Ver 14.14 Distrib 5.5.20, for osx10.7 (i386) using readline 5.1. If I roll back to mysql 5.1 the issue (malformed packet error using LOAD DATA INFILE) is not present. |
+1 to getting this committed as on a mysql2 fork until it is. @brianmario or @tenderlove , any chance of this happening? |
+1, would like to see this merged in. In the meantime, not sure how to specify sodabrew's branch in my Gemfile. I have this: gem "mysql2", git: "https://github.com/sodabrew/mysql2.git", branch: "issue-233" But updating the bundle doesn't seem to be taking enough time to have actually recompiled the native extensions (even after blowing away the old directory). It does say "Using mysql2 (0.3.11) from https://github.com/sodabrew/mysql2.git (at issue-233) with native extensions" but it never says "Installing". And I still get the |
+1, would like to see this merged. Worked like a charm for me. |
I ran into this issue as well, and fixed it in my own fork before I saw the issues/pullrequests from @sodabrew. My fixes are at https://github.com/menno/mysql2/commit/cf72bc1fba86e48ec97b428efea14a7e854b97e7 (based on 0.2.x) and https://github.com/menno/mysql2/commit/30302b7c7b6083f771c7c955e65dce2793264147 (based on master). I did not refactor any code like sodabrew did. After applying the patches I added "local_infile: true" to my database.yml and it all works as expected. Hope to see this resolved officially soon! |
Conflicts: ext/mysql2/client.c ext/mysql2/client.h
@brianmario Done, updated to current master in my issue-233 branch. Confirmed that specs pass. I could split this into two pull requests if you need; it is split as refactor first, then add :local_infile, as two separate commits in this pull request. |
Oh this is such sweet awesome splendor. Thanks @sodabrew and @brianmario ! |
wrapper->reconnect_enabled = boolval; | ||
} | ||
|
||
return INT2NUM(result == 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.
Could we just return true/false here? Feels more ruby-ish to do that instead of return an int that represents the same. What do you think?
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.
Sounds good to me!
Issue 233 - Add :local_infile option and refactor mysql_options code
closes #43 |
Thinking about removing the Thoughts? |
I have no objection to keeping this private and/or removing the public method -- you're right, there's not much you can do with the method yet. I was thinking we would expose more options as the need arose, but it's probably better to try and get all the options exposed in one shot when you're ready for it. |
Tests pass, code cleaned up, cherry-picked to a new branch and tested, current with master.