Skip to content

Problem with MySQL catalog table consistency

Summary

Reproducibility Platform OS OS Version Product Version
always AMD64 Ubuntu Jammy 13.0.0

Description

Hello Everybody,

For the MySQL catalog database there is a problem with the table consistency. In the Job table the FileTable column is missing.

FileTable column has been added to the make_mysql_tables.in file for version 7.2.0 in commit:

https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/commit/4d2b94fa3e8018d1a462756ad6e1df7e12a29d20

It was added to make_mysql_tables.in but not to update_mysql_tables.in.

Five year later the FileTable column has been added to update_mysql_tables.in for version 13.0.0 in commit:

https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/commit/1af8223236c1fc827fd7eeaabde3da8477f8116c

The problem is that every Bacula MySQL catalog that was created before 7.2.0 will be impacted by this problem.

Running the update_mysql_tables for version 13.0.0 (where FileTable exists) will not solve this issue because this FileTable column is added in this file for the catalog format 15, but all users who created the catalog on version lower than 7.2.0 currently have the catalog format in version greater than 15.

The make the tables consistent back manually users can run the following two SQL commands:

ALTER TABLE Job ADD COLUMN FileTable CHAR(20) default 'File';
ALTER TABLE JobHisto ADD COLUMN FileTable CHAR(20) default 'File';

Thanks in advance for solving this problem.

Best regards, Marcin Haba (gani)

Steps to Reproduce

  1. Create the Bacula Catalog with MySQL on version lower than 7.2.0
  2. Do the major versions updates until version 13.0.0
  3. Check if FileTable column exists in the Job table.