MySQL Forums
Forum List  »  MyISAM

Re: "Specified key was too long. Max key length is 500" with a ALTER statement
Posted by: Rick James
Date: August 12, 2009 08:23PM

Plan A: recompile MySQL 3 to change the 500. (I assume it was a defined constant in the code.)

Plan B: use VARCHAR(249) instead of 255.

Plan C: use prefix on index (if you need the index), then do the UNIQUEness constraint in your code.

utf8 complicates things (beginning in ~4.1) because the 255 needs to be tripled when computing index size. But maybe you could limit that name and module be to ascii, not utf8.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: "Specified key was too long. Max key length is 500" with a ALTER statement
2841
August 12, 2009 08:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.