Not the answer you need?
Register and ask your own question!

Error #1071 restoring dump.

marciomarcio ContributorCurrent User Role Contributor
Hello.
I have 3 nodes XtraDB Cluster 5.7.21 and when try to restore a dump file from MariaDB I see:

#mysql -p ocs < ocs.dump
#ERROR 1071 (42000) at line 597: Specified key was too long; max key length is 1000 bytes

Small part of the dump file:
DROP TABLE IF EXISTS `engine_mutex`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `engine_mutex` (
`NAME` varchar(255) NOT NULL DEFAULT '',
`PID` int(11) DEFAULT NULL,
`TAG` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`NAME`,`TAG`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

I changed the engine from MEMORY to InnoDB and restore it w/o errors.

The question is: if this change on the engine is the correct form to avoid the error ?
It's a third-party application and we can not change the code.

BR
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.