sql doesn't work
  • Vote Up0Vote Down importimport
    Posts: 0Member
    (line: 672)

    My MySQL server borks on this piece.

    mysql> CREATE TABLE `TopicFields` (
    -> `ArticleType` varchar(250) NOT NULL default '',
    -> `FieldName` varchar(250) NOT NULL default '',
    -> `RootTopicId` int(10) NOT NULL default '0',
    -> PRIMARY KEY (`ArticleType`,`FieldName`)
    -> ) TYPE=MyISAM;
    ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
  • 1 Comment sorted by
  • As reference:

    DROP TABLE IF EXISTS `TopicFields`;
    CREATE TABLE `TopicFields` (
    `ArticleType` varchar(166) NOT NULL default '',
    `FieldName` varchar(166) NOT NULL default '',
    `RootTopicId` int(11) NOT NULL default '0',
    PRIMARY KEY (`ArticleType`,`FieldName`)
    ) TYPE=MyISAM;

    Does work.