-
Notifications
You must be signed in to change notification settings - Fork 552
patch for issue #878 #880
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
patch for issue #878 #880
Conversation
#include <server/mysql_com.h> | ||
#include <errmsg.h> | ||
#include <mysqld_error.h> | ||
#include <server/mysql_version.h> |
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.
I wonder why these headers are spread out across two paths like this. What did they change?
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.
Looks like MariaDB/server@3ec96c1 is the culprit?
MDEV-13370 Ambiguous behaviour regarding installation of header files
install all server includes under /usr/include/mysql/server/ and C/C includes under /usr/include/mysql/
I have tested this PR with the following:
Apparently when you can use
So, I think this is a reasonable test of this PR. I guess I'd recommend merging. |
Thanks for the link to the upstream bug! What I took from it is that if we make this suggested change, it will allow mysql2 to draw from the MariaDB server package headers. I actually want to be sure that the mysql2 gem can compile and run with only the MariaDB Connector/C client package installed. |
You're welcome! It definitely took some research (and some
Oh, good point! But, please be aware that in homebrew the |
Oh, that's interesting that the packages conflict currently. If it's the case that this PR allows mysql2 to operate with the MariaDB-server-client package, and it already works with the MariaDB-connector-c package, then it's sort of a no-brainer to just merge this as-is and let the have_header checks sort things out. Having this new Connector/C on the scene really makes the testing matrix complicated... :| |
Fine by me. It's no reason to hold up the PR, but just FYI I'm going to try to upgrade our staging server to mariadb 10.2.8 so I can test this PR against the ubuntu packages. I'm not sure how valuable that test is, because we install both the |
I've performed this test and am now running mariadb 10.2.8 on my staging server and using the following in my Gemfile:
@sodabrew anything else we need to do before merging this? Just a reminder this is a priority because homebrew users are completely unable to use the (official) |
@sodabrew two week ping. Anything else you need from us? |
I think this is the wrong approach. The real fix is to not include mysql_com.h (renamed to mariadb_com.h) nor mysql_version.h (renamed to mariadb_version.h) when they don't exist as the |
@grknight I agree, the gem should be less coupled to file locations. There's some additional changes to make in order to handle differences in what is defined in mysql_version.h and mariadb_version.h - they do not appear to be equal. Using server/mysql_version.h retains compatibility. At a bare minimum referencing LIBMYSQL_VERSION doesn't seem to be supported by mariadb_version.h In the short term does it make sense to accept the patch and then circle back on refactoring to a better long term solution? |
I've got a second fix implementation addressing @grknight concerns... not sure if it holistically addresses the coupling issues. |
Thank you for the PR! I worked this out a bit differently in #900, please take a look to make sure it works for you! |
Newer version of mariadb seem to have moved or renamed a few header files.