Topic: Specified key was too long; max key length is 255 bytes (Errno: 1071)

I've just notice this error when upgrading on MySQL 4.1.11-Debian_4sarge7-log

The request is : ALTER TABLE online ADD UNIQUE INDEX online_user_id_ident_idx(user_id,ident)

I have just seen that the collation of the tables is utf-8_bin; can this cause the error?

Re: Specified key was too long; max key length is 255 bytes (Errno: 1071)

ok i've try to switch collation to latin-1 and it's ok now

Re: Specified key was too long; max key length is 255 bytes (Errno: 1071)

Yeah, UTF-8 is multibyte and thus can only store half of 255 (which would round down to about 127).