Bug 1470741 - mariadb library upgrade to 10.2 causes FTBFS
Summary: mariadb library upgrade to 10.2 causes FTBFS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: opensips
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: John Khvatov
QA Contact: Fedora Extras Quality Assurance
URL: https://apps.fedoraproject.org/kosche...
Whiteboard:
Depends On:
Blocks: 1467297
TreeView+ depends on / blocked
 
Reported: 2017-07-13 14:35 UTC by Honza Horak
Modified: 2017-07-20 19:21 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-20 19:21:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed patch (788 bytes, patch)
2017-07-13 14:35 UTC, Honza Horak
no flags Details | Diff
Patch to allow compilation of opensips with MariaDB 10.2 (697 bytes, patch)
2017-07-20 13:27 UTC, Augusto Caringi
no flags Details | Diff

Description Honza Horak 2017-07-13 14:35:20 UTC
Created attachment 1297702 [details]
Proposed patch

Description of problem:
With new version of MariaDB 10.2 we see basically this build issue:

my_con.c: In function 'db_mysql_connect':
my_con.c:68:10: error: 'MYSQL {aka struct st_mysql}' has no member named 'reconnect'
  ptr->con->reconnect = 0;
          ^~
make[1]: *** [../../Makefile.rules:25: my_con.o] Error 1

Comment 1 Adam Williamson 2017-07-14 02:01:09 UTC
Can you submit the patch upstream? https://github.com/OpenSIPS/opensips/pulls

I'm trying to help out with the rebuilds, and I have provenpackager privileges so I can commit fixes, but I usually prefer patches that have been submitted upstream (so we can provide a nice reference to an upstream pull request in the spec, and it's easy to see when the patch can be removed).

Comment 2 Adam Williamson 2017-07-14 02:02:31 UTC
Also, um, doesn't your patch do exactly the wrong thing? Per https://dev.mysql.com/doc/refman/5.7/en/auto-reconnect.html , you set MYSQL_OPT_RECONNECT to *0* in order to disable auto-reconnect (which is what the code wants to do, per the comment), not *1* (which is what your patch does).

Comment 3 Adam Williamson 2017-07-14 02:03:47 UTC
Also https://mariadb.com/kb/en/mariadb/mysql_optionsv/ says "my_bool reconnect= 1; /* enable reconnect */"

Comment 4 Petr Pisar 2017-07-20 05:47:08 UTC
opensips-2.2.3-3.fc27 is affected.

Comment 5 Augusto Caringi 2017-07-20 13:27:45 UTC
Created attachment 1301736 [details]
Patch to allow compilation of opensips with MariaDB 10.2

Comment 6 Augusto Caringi 2017-07-20 13:29:00 UTC
Patch updated and submitted upstream: 

https://github.com/OpenSIPS/opensips/pull/1164

Comment 7 Adam Williamson 2017-07-20 18:42:44 UTC
I've applied the patch and started a build: https://koji.fedoraproject.org/koji/taskinfo?taskID=20631719

Comment 8 Adam Williamson 2017-07-20 19:21:30 UTC
Build done: https://koji.fedoraproject.org/koji/buildinfo?buildID=920762


Note You need to log in before you can comment on or make changes to this bug.