Bug 1971699 - Compatibility issue with bacula + mariadb + mysqldump from community-mysql
Summary: Compatibility issue with bacula + mariadb + mysqldump from community-mysql
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bacula
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Simone Caronni
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-14 15:31 UTC by Paul Howarth
Modified: 2021-06-14 17:42 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-14 17:42:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Paul Howarth 2021-06-14 15:31:30 UTC
Description of problem:
The mysqldump task that runs as part of the catalog backup process does not work properly in Fedora 34 with mariadb-server and mysqldump from community-mysql 8.x:

11-Jun 08:20 tycho-dir JobId 8168: shell command: run BeforeJob "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"
11-Jun 08:20 tycho-dir JobId 8168: BeforeJob: mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'bacula' AND TABLE_NAME = 'BaseFiles';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
(repeated for many tables).
11-Jun 08:22 tycho-dir JobId 8168: Error: Runscript: BeforeJob returned non-zero status=2. ERR=Child exited with code 2
11-Jun 08:22 tycho-dir JobId 8168: Error: Bacula tycho-dir 11.0.3 (21Mar21):

This seems to be because in version 8.0 of community-mysql onwards, the mysqldump command tries to do column statistics by default, which are not supported by mariadb:
https://serverfault.com/questions/912162/mysqldump-throws-unknown-table-column-statistics-in-information-schema-1109

I have been able to work around this issue by creating /etc/my.cnf.d/zz-no-column-statistics.cnf on my database server, with content:

>>>---------
# MySQL 8 turns on column statistics by default, which is not compatible with MariaDB
# https://serverfault.com/questions/912162/mysqldump-throws-unknown-table-column-statistics-in-information-schema-1109

[mysqldump]
column-statistics=0
<<<---------

A better fix might be to patch the /usr/libexec/bacula/make_catalog_backup.pl script to run mysqldump with the "--column-statistics=0" option specified.

Comment 1 Paul Howarth 2021-06-14 17:42:31 UTC
Looks like my install of mariadb-server using ansible pulled in the community-mysql client rather than the mariadb client, which is an option.

After doing "dnf swap community-mysql mariadb" all was well.


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