Mysql – Can MySQL 5.1 read a MySQL 5.5 MyISAM file

myisamMySQL

We're in the middle of an upgrade from mysql 5.1 to mysql 5.5. Our only remaining holdout is the master, at 5.1, while all the slaves are at 5.5.

However, we have a stats process that runs on an admin slave, which rsyncs the myisam files to the master, who mount it in a stats DB, then imports those stats into the main production db.

All the tables use the default row_format for myisam, which is static. We're only using simple column types: int, varchar, enum, datetime.

We've already run this process, and it didn't fall down, which is encouraging. But I'm concerned with errors that didn't make it into the log.

So the question is: what are the complications of this process? The MyISAM file is created by a 5.5 instance, then moved to a 5.1 instance.

What's going to go wrong?

(This is a duplicate post to https://stackoverflow.com/questions/9415715/can-mysql-5-1-read-a-mysql-5-5-myisam-file, where there was no detailed answer available.)

Best Answer

What could go wrong? If the way MyISAM changed the format of how something is stored in their files, it will break on 5.1. This will render your stats database on the master corrupt and unusable.

Even if the initial load went fine, it doesn't mean something won't come along later with the result listed above...a corrupt database. It's a risk, and if it can be avoided, I personally would do so.

And in your case, it can be avoided by dumping the data using mysqldump quickly and then load into the 5.1 instance.