You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2017/09/13 22:05:23 UTC

[Bug 61517] New: APR-Util configure fails against mariadb-10.2.8+

https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

            Bug ID: 61517
           Summary: APR-Util configure fails against mariadb-10.2.8+
           Product: APR
           Version: 1.6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR-util
          Assignee: bugs@apr.apache.org
          Reporter: bugs-a17@moonlit-rail.com
  Target Milestone: ---

Created attachment 35325
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35325&action=edit
Patch to fix MariaDB-10.2 detection

The configure script for APR-Util fails to detect the current "GA" release of
MariaDB, 10.2.  This is due to a re-factoring of header files under
/usr/include/mysql, introduced in mariadb-10.2.8, that move "server" and other
internal headers into their own private subdirectories.

The actual MySQL code, in dbd/apr_dbd_mysql.c, has been written to deal with
different versions of header files being loaded; it compiles just fine with the
newer MariaDB.

But the autoconf script in build/dbd.m4 looks for internal header files that
are not really supposed to be used by client code, specifically my_sys.h and
my_global.h.  I rewrote the logic to gate inclusion of MySQL on only two client
headers, mysql.h and errmsg.h.  The other header files are still tested, but do
not gate inclusion of MySQL.

As the newer mariadb-10.2 changes the name of its shared library from
libmysqlclient to libmariadb, I also added detection and handling for that.

I have attached my patch against apr-util-1.6.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

--- Comment #2 from Nick Kew <ni...@webthing.com> ---
This proposed patch seems to complicate the mysql m4, and may make it harder
and more error-prone to maintain.

Would it perhaps make sense to give mariadb its own --with-mariadb option in
the config?  It can of course still use the mysql client code, and #define
APR_MARIADB for use anywhere in the code that wants a distinction (like
my_init).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

--- Comment #4 from Bernard Spil <br...@freebsd.org> ---
(In reply to Nick Kew from comment #2)
> This proposed patch seems to complicate the mysql m4, and may make it harder
> and more error-prone to maintain.
> 
> Would it perhaps make sense to give mariadb its own --with-mariadb option in
> the config?  It can of course still use the mysql client code, and #define
> APR_MARIADB for use anywhere in the code that wants a distinction (like
> my_init).

Hi Nick,

One of the users of both MariaDB and APR-util notified me of this problem on
FreeBSD which led me to this PR.

I can confirm that this issue exists with MariaDB 10.2.12 on FreeBSD 11.1 amd64
with APR 1.6.3 / APR-util 1.6.1.

The patch complicates things but most applications deal with the issue
properly. As maintainer of MariaDB ports on FreeBSD, and member of the apache
team for FreeBSD ports, I have seen many issues with MariaDB 10.2. In the
recent versions, they've modified the headers to be more compatible with
software expecting MySQL.
All in all I think this complicates things, but could potentially be simplified
by refactoring the code in APR-util. It looks like it supports pre-5.0 versions
as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

Kris Karas <bu...@moonlit-rail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35325|0                           |1
        is obsolete|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

Tom Donovan <To...@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lbcbash@gmail.com

--- Comment #6 from Tom Donovan <To...@acm.org> ---
*** Bug 65098 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

--- Comment #1 from Kris Karas <bu...@moonlit-rail.com> ---
Created attachment 35326
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35326&action=edit
Updated patch to compile apr-util against mariadb-10.2.8+

Looks as if I spoke too soon.  Looks as if we need to remove spurious
references to my_init() when dealing with mariadb-10.2+

I have updated my patch to include a minor adjustment to dbd/apr_dbd_mysql.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

--- Comment #3 from Chao-Jui Chang <pp...@gmail.com> ---
According to MySQL 5.7 Reference Manual(1),
my_init() should be replace with mysql_library_init(0, NULL, NULL);

1: https://dev.mysql.com/doc/refman/5.7/en/c-api-threaded-clients.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

Graham Leggett <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Graham Leggett <mi...@apache.org> ---
Also just ran into this problem.

I think the proposed patch is reasonably straightforward, and any complication
is really driven by the mysql/mariadb split, not the APR code.

The patch looks more complicated than it really is because it includes some
unrelated whitespace changes (tabs) on unrelated lines.

I have tested an updated version of the patch against mysql 5.7 and mariadb
10.2, and it works for me.

Trunk fix: http://svn.apache.org/viewvc?rev=1872060&view=rev
Apr-util 1.7 fix: http://svn.apache.org/viewvc?rev=1872061&view=rev

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 61517] APR-Util configure fails against mariadb-10.2.8+

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61517

Chao-Jui Chang <pp...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppc52776@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org