Search code examples
mysqlmariadbfederated-tablefederated-storage-engine

How to make federated tables persistent between restarts on MariaDB?


I'm moving from MySql to MariaDB and I have several databases using federated tables. Everything works fine in the MariaDB but when the server restarts, all federated tables stop working as if the remote server's entry doesn't exists on the local MariaDB server.

After every restart the servers' entries remain in the servers table in the mysql db. If I try to add them again with the CREATE SERVER command, I get an error as if they exist. If I try to drop them with DROP SERVER, I get an error as if they don't exist.

The only way to make it work again is to manually remove the entries from the server table with DELETE FROM servers and create them again with the command CREATE SERVER. How can I make those configurations persistent?

I've searched extensible and couldn't find any solution or mention about this issue. The tables work fine in MySql. The logs doesn't mention anything related to the FederatedX engine between restarts. I'm using MariaDB 10.3.18 on CentOS 7.


Solution

  • I just found that this issue only occurs if the servers table is using the InnoDB engine. Changing it to MyISAM or Aria solves the problem.

    For some reason my server was installed with the wrong engine for this table.

    Edit: bug report here.