jstricker
jstricker

Reputation: 2180

"ERROR 1031 (HY000) at line ###: Table storage engine for '<table_name>' doesn't have this option" when creating table

When importing data exported via mysqldump into a new MySQL database, I get the following error on a create table statement:

ERROR 1031 (HY000) at line ###: Table storage engine for '<table_name>' doesn't have this option

The reference to "this option" seems pretty vague. What's causing the error?

Upvotes: 1

Views: 4295

Answers (1)

jstricker
jstricker

Reputation: 2180

When creating a table in MySQL 5.6 and earlier, the option ROW_FORMAT=FIXED would be silently interpreted as ROW_FORMAT=COMPACT. In MySQL 5.7.7 and newer with innodb_strict_mode enabled, the behavior is different--FIXED is no longer a valid value. If a table created with ROW_FORMAT=FIXED is exported and them imported into a MySQL 5.7.7 and newer, you'll get an error about the storage engine not having that option.

Thankfully, the fix is easy. Change ROW_FORMAT=FIXED to ROW_FORMAT=COMPACT in any SQL statements that trigger the error. Alternatively, you could disable innodb_strict_mode to get the previous behavior.

See MySQL bug #77625 for more information.

Upvotes: 3

Related Questions