create table t1 (a char(160) character set utf8, primary key(a));
ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys
ERROR 42000: Specified key was too long; max key length is 255 bytes
ERROR 42000: Specified key was too long; max key length is 255 bytes
create table t1 (a text, key (a(300)));
ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys
create table t1 (a text, key (a(255)));
Warnings:
Warning 1071 Specified key was too long; max key length is 255 bytes