Bug 1470741 - mariadb library upgrade to 10.2 causes FTBFS
mariadb library upgrade to 10.2 causes FTBFS
Product: Fedora
Classification: Fedora
Component: opensips (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: John Khvatov
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: 1467297
  Show dependency treegraph
Reported: 2017-07-13 10:35 EDT by Honza Horak
Modified: 2017-07-20 15:21 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-20 15:21:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Honza Horak 2017-07-13 10:35:20 EDT
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-13 22:01:09 EDT
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-13 22:02:31 EDT
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-13 22:03:47 EDT
Also https://mariadb.com/kb/en/mariadb/mysql_optionsv/ says "my_bool reconnect= 1; /* enable reconnect */"
Comment 4 Petr Pisar 2017-07-20 01:47:08 EDT
opensips-2.2.3-3.fc27 is affected.
Comment 5 Augusto Caringi 2017-07-20 09:27 EDT
Created attachment 1301736 [details]
Patch to allow compilation of opensips with MariaDB 10.2
Comment 6 Augusto Caringi 2017-07-20 09:29:00 EDT
Patch updated and submitted upstream: 

Comment 7 Adam Williamson 2017-07-20 14:42:44 EDT
I've applied the patch and started a build: https://koji.fedoraproject.org/koji/taskinfo?taskID=20631719
Comment 8 Adam Williamson 2017-07-20 15:21:30 EDT
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.