Bug 1467706

Summary: mariadb library upgrade to 10.2 causes bacula FTBFS
Product: [Fedora] Fedora Reporter: Augusto Caringi <acaringi>
Component: baculaAssignee: Simone Caronni <negativo17>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: andreas, gwync, jridky, negativo17, phracek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-21 07:28:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1467297    
Attachments:
Description Flags
Patch to allow compilation of bacula with MariaDB 10.2 none

Description Augusto Caringi 2017-07-04 17:26:54 UTC
Created attachment 1294296 [details]
Patch to allow compilation of bacula with MariaDB 10.2

Trying to build bacula with the new version of MariaDB 10.2 causes a build error:

mysql.c: In member function 'virtual bool BDB_MYSQL::bdb_open_database(JCR*)':
mysql.c:256:20: error: 'MYSQL {aka struct st_mysql}' has no member named 'reconnect'
    mdb->m_instance.reconnect = 1;             /* so connection does not timeout */
                    ^~~~~~~~~

In this new version of the library the reconnect field was moved to another struct. I think that the best approach is to set it through API. I attached a patch proposal to fix the problem.

We are tracking all the possible problems regarding this MariaDB upgrade in the bug 1467297.

Copr build: https://copr.fedorainfracloud.org/coprs/g/db-sig/mariadb-10.2/package/bacula/

Comment 1 Simone Caronni 2017-07-10 06:47:32 UTC
Testing with freshly released Bacula 9.

Comment 2 Augusto Caringi 2017-07-20 11:51:19 UTC
The problem persist with the new Bacula 9... 

mysql.c: In member function 'virtual bool BDB_MYSQL::bdb_open_database(JCR*)':
mysql.c:261:20: error: 'MYSQL {aka struct st_mysql}' has no member named 'reconnect'
    mdb->m_instance.reconnect = 1;             /* so connection does not timeout */
                    ^~~~~~~~~
make[1]: *** [Makefile:183: mysql.lo] Error 1

My proposed patch can fix this problem.

Comment 3 Simone Caronni 2017-07-21 07:28:09 UTC
Applied a rebased, patch, thanks. Also upstream has done it.