Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
ERROR 1071 (42000) at line 1584: Specified key was too long; max key length is 1000 bytes

Wiki MarkupReading the line 1584 in the *jwdb-empty.sql* file can see a table declaration. It define three keys: *oid, TOOL_AGENT_NAME and APP_NAME*. As the charset is *utf8* and *TOOL_AGENT_NAME and APP_NAME* are varchars of 250 and 90 chars respectivilly, then the combined key is \ [(250 + 90) * 3 bytes\] (3 bytes each utf8 char) = 930 bytes. As you can read in the [Mysql documentation|http://dev.mysql.com/doc/refman/5.0/en/column-indexes.html]\[1\], you should take the limit of 1000 bytes for prefix indexes (767 bytes in InndoDB engine) into account when specifying a prefix length for a column that uses a multi-byte character set.

A workaround is to change the charset to latin1:

...

  • What ideas do you have to resolve this issue?
  • Is this happening only to me?

Wiki Markup\[1\] http://dev.mysql.com/doc/refman/5.0/en/column-indexes.html