Error : #1071 - Specified key was too long
Posted: Thu Nov 30, 2006 12:34 am
Dear all,
I have created a table like below with MyISAM engine and shows error :
MyISAM
But while using InnoDB table engine, it works fine.
InnoDB
Are therey any issues on key length on MyISAM table engine ?
I have created a table like below with MyISAM engine and shows error :
Code: Select all
#1071 - Specified key was too long; max key length is 1000 bytesCode: Select all
CREATE TABLE `tbl_pos_main_cat` (
`pos_main_cat_id` TINYINT( 4 ) NOT NULL AUTO_INCREMENT ,
`pos_main_cat_sf` VARCHAR( 255 ) NOT NULL DEFAULT '',
`pos_main_cat_ff` VARCHAR( 255 ) NOT NULL DEFAULT '',
PRIMARY KEY ( `pos_main_cat_id` ) ,
UNIQUE KEY `UNIQUE_tbl_pos_main_cat` ( `pos_main_cat_sf` , `pos_main_cat_ff` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 ROW_FORMAT = COMPACT COMMENT = 'Part-of-Speech Main Category'
InnoDB
Code: Select all
CREATE TABLE `tbl_pos_main_cat` (
`pos_main_cat_id` TINYINT( 4 ) NOT NULL AUTO_INCREMENT ,
`pos_main_cat_sf` VARCHAR( 255 ) NOT NULL DEFAULT '',
`pos_main_cat_ff` VARCHAR( 255 ) NOT NULL DEFAULT '',
PRIMARY KEY ( `pos_main_cat_id` ) ,
UNIQUE KEY `UNIQUE_tbl_pos_main_cat` ( `pos_main_cat_sf` , `pos_main_cat_ff` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ROW_FORMAT = COMPACT COMMENT = 'Part-of-Speech Main Category'