魏长东

weichangdong

Specified key was too long; max key length is 1000 bytes

【ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes 】

  PRIMARY KEY (`id`),
  KEY `time_stamp` (`time_stamp`,`uiver`,`channel_id`),
  KEY `time_area` (`time_stamp`,`uiver`,`area`),
  KEY `time_lang` (`time_stamp`,`uiver`,`lang`),
  KEY `idx_ui_cha_are_time_user` (`uiver`,`channel_id`,`area`,`time_stamp`,`active_user`),
  KEY `idx_ui_cha_sub_are_la_time` (`uiver`,`channel_id`,`sub_channel_id`,`area`,`lang`,`time_stamp`)
) ENGINE=MyisAM  DEFAULT CHARSET=utf8;

之前是innodb,改成myisam,有些key太长,报错,然后吧CHARSET改成了latin1。