1071 error to do with keys - sql import
Posted: Wed Feb 28, 2007 3:04 pm
Hi there,
I've found one thread and I know what the error means, I just don't know what values or how I can get around this.
I have been building an install locally and am now transferring an SQL dump of the install to the live server.
It runs mySQL 5.027 - I get an error when it try to import the serendipity_exits table.
Any idea on the best fix .. he collation for the database and tables have been set to utf8.
An update:
the other tables having problems here are:
Ok another update here.
I had an older version of serendipity installed on the same server so I was able to copy the table structure for serendipity_exits over. i can do the same for serendipity_permalinks, but the problem is the keys on the current version of sernedipity differs to that of the older version .. will this pose a problem, is there a way I can fix this ?
this sql import does not work:
however this does work
the last line containing the key
must be causing the key length to go over 1000
Thanks,
Ket
I've found one thread and I know what the error means, I just don't know what values or how I can get around this.
I have been building an install locally and am now transferring an SQL dump of the install to the live server.
It runs mySQL 5.027 - I get an error when it try to import the serendipity_exits table.
Code: Select all
SQL query:
CREATE TABLE `serendipity_exits` (
`entry_id` int( 11 ) NOT NULL default '0',
`day` date NOT NULL default '0000-00-00',
`count` int( 11 ) NOT NULL default '0',
`scheme` varchar( 5 ) default NULL ,
`host` varchar( 128 ) NOT NULL default '',
`port` varchar( 5 ) default NULL ,
`path` varchar( 255 ) NOT NULL default '',
`query` varchar( 255 ) default NULL ,
PRIMARY KEY ( `host` , `path` , `day` , `entry_id` ) ,
KEY `exits_idx` ( `entry_id` , `day` , `host` )
) TYPE = MYISAM ;
MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes An update:
the other tables having problems here are:
Code: Select all
serendipity_permalinks
serendipity_plugincategories
Ok another update here.
I had an older version of serendipity installed on the same server so I was able to copy the table structure for serendipity_exits over. i can do the same for serendipity_permalinks, but the problem is the keys on the current version of sernedipity differs to that of the older version .. will this pose a problem, is there a way I can fix this ?
this sql import does not work:
Code: Select all
CREATE TABLE `ethical_pulse`.`serendipity_permalinks` (
`permalink` varchar( 255 ) COLLATE utf8_unicode_ci NOT NULL default '',
`entry_id` int( 10 ) unsigned NOT NULL default '0',
`type` varchar( 200 ) COLLATE utf8_unicode_ci NOT NULL default '',
`data` text COLLATE utf8_unicode_ci,
KEY `pl_idx` ( `permalink` ) ,
KEY `ple_idx` ( `entry_id` ) ,
KEY `plt_idx` ( `type` ) ,
KEY `plcomb_idx` ( `permalink` , `type` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci
however this does work
Code: Select all
CREATE TABLE `ethical_pulse`.`serendipity_permalinks` (
`permalink` varchar( 255 ) COLLATE utf8_unicode_ci NOT NULL default '',
`entry_id` int( 10 ) unsigned NOT NULL default '0',
`type` varchar( 200 ) COLLATE utf8_unicode_ci NOT NULL default '',
`data` text COLLATE utf8_unicode_ci,
KEY `pl_idx` ( `permalink` ) ,
KEY `ple_idx` ( `entry_id` ) ,
KEY `plt_idx` ( `type` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci
Code: Select all
KEY `plcomb_idx` ( `permalink` , `type` ) Thanks,
Ket