Can’t create table `catalog_product_relation` (errno: 140 “Wrong create options”)

When I try to restore the MySQL database of a Magento 1.x site on MariaDB 10.3.32 (source MySQL 5.7.36), I get the following error

boby@sok-01:/www/magento/amazingplans/backup$ mysql amazingplans < amazingp_demo.sql
ERROR 1005 (HY000) at line 4080: Can't create table `amazingplans`.`catalog_product_relation` (errno: 140 "Wrong create options")
boby@sok-01:/www/magento/amazingplans/backup$

On checking the line in the error message, I found the error is due to the following SQL statement.

CREATE TABLE `catalog_product_relation` (
  `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Parent ID',
  `child_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Child ID',
  PRIMARY KEY (`parent_id`,`child_id`),
  KEY `IDX_CATALOG_PRODUCT_RELATION_CHILD_ID` (`child_id`),
  CONSTRAINT `FK_CAT_PRD_RELATION_CHILD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`child_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_CAT_PRD_RELATION_PARENT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Catalog Product Relation Table';

Fixed it by removing

Advertisement

ROW_FORMAT=FIXED

From the SQL.

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement