MySQL 5.5 vs 5.6: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

I was building an index which was too long using MySQL 5.5. MySQL returned a

WARNING 1071 (42000): Specified key was too long; max key length is 767 bytes

The index got silently truncated. And, at least on the surface, everything worked.

Now I had someone else using my script but on MySQL 5.6. Which returned an ERROR:

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

Turns out, this is intended behavior on MySQL 5.6:

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply