Skip to content

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ext/mysql2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def add_ssl_defines(header)
rpath_dir = usr_local_lib
end

if have_header('mysql.h')
if have_header('server/mysql.h')
prefix = nil
elsif have_header('mysql.h')
prefix = nil
elsif have_header('mysql/mysql.h')
prefix = 'mysql'
Expand Down
8 changes: 7 additions & 1 deletion ext/mysql2/mysql2_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ void Init_mysql2(void);
#define RSTRING_NOT_MODIFIED
#include <ruby.h>

#ifdef HAVE_MYSQL_H
#ifdef HAVE_SERVER_MYSQL_H
#include <mysql.h>
#include <server/mysql_com.h>
#include <errmsg.h>
#include <mysqld_error.h>
#include <server/mysql_version.h>
Copy link
Collaborator

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?

Copy link
Contributor

@jaredbeck jaredbeck Aug 23, 2017

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/

https://jira.mariadb.org/browse/MDEV-13370

#elif HAVE_MYSQL_H
#include <mysql.h>
#include <mysql_com.h>
#include <errmsg.h>
Expand Down