I had the same problem and found the solution.
Tables catalog_category_entity and core_store were MyISAM instead of InnoDB.
Check these two tables in your database and if they are MyISAM instead of InnoDB, run these SQL statements:
ALTER TABLE catalog_category_entity ENGINE=INNODB;
ALTER TABLE core_store ENGINE=INNODB;