MySQLdump: beware storage engine

Been replicating MySQL databases from master to slave computers and encountered a frustrating, and potentially major problem:

The storage engine is not preserved by mysqldump command. So if you require transactions, which depend on InnoDB storage engine, but your slave uses default storage engine of MyISAM, you could have problems if restoring slave data to the master.

Of course, one could use InnoDB as the default storage engine (set in my.cnf startup configuration file), but that's a slower storage method. That may not impact performance of slaves, depending on if you query against slaves and write against masters...

This is pissing me off a fair bit and really makes me want to look more into (finally) making the switch to PostgreSQL for once and all.

I'll try to update this with potential consequences and any fixes / scripts I come up with to address the issue, but be forewarned.

Tags: