1

I successfully run a cluster of 3 DB servers using MariaDB Galera 10.0.16. This setup handels a couple of web apps we have created, plus a dozen medium traffic Joomla websites.

My problem is that Galera doesn't like MyISAM. Pretty often, when a plugin or component in Joomla gets installed, it sets the MySQL engine in its install.sql like so:

ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 

When that happens, a simple Joomla component installation can (and has) break the replication.

Is there a way that I can force the server to ignore the ENGINE setting?

Thanks.

2 Answers 2

1

Percona XtraDB Cluster has this feature already (enforce_storage_engine) and for MariaDB there is a pending feature request reported by me to Colin...

https://mariadb.atlassian.net/browse/MDEV-6858

1
  • Thanks for your reply. I wasn't aware that Percona offers that, so I guess that the question now is if this is important enough for us to migrate to Percona. Commented Mar 9, 2015 at 13:21
0

This is a good question. People tend to want that when using NDB cluster and Galera.

The right answer is that you should report the plugin creators to create the tables with no engine definition, so you can set it with "default_engine" option. While on other cases you could disable the engine and force the engine substitution with the default one, that is not a good practice, it is discouraged on the latest versions and impossible with MyISAM.

The truth is that once the developer writes ENGINE=X, it is forcing the creation of the engine, as written. The only way to accomplish that is by rewriting the query on-the-fly. That is available in MySQL 5.7 (not yet GA), with several plugins. The only way I can think of doing it now is with a SQL proxy like ProxySQL or MySQL Proxy. Please note that some of those are infamous for bad performance, so you may want to enable it only on plugin activation/disabling.

There is obviously another option: download the MariaDB Cluster sources, disable MyISAM on the CREATE TABLE Syntax, and compile! 😋

1
  • Thanks for your reply. I guess from manually compiling MariaDB each time there is an update it would be easier to migrate to Percona or have our own forks of the plugins we usually use. Commented Mar 9, 2015 at 13:23

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.