Table ACT_GE_PROPERTY cannot be created on MySQL with UTF-8 encoding due to limitation of key index length

Description

db.create:
[sql] Executing resource: org/activiti/db/create/activiti.mysql.create.sql

[sql] Failed to execute: create table ACT_GE_PROPERTY ( NAME_ varchar(300
), VALUE_ varchar(300), REV_ integer, primary key (NAME_) ) TYPE=InnoDB

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes

Problem is that NAME_ is used as primary key and a unique index is created to ensure integrity. Because the encoding is set to UTF-8, 3-bytes are uses per character in the varchar, resulting in 900 bytes for the varchar, wich exeeds the 767 byte limit on InnoDB.

This is a know issue and has been present since 2004 in MySQL and I'm guessing there not very eager on fixing it: http://bugs.mysql.com/bug.php?id=4541 -> should be working in MyISAM mode, since they use hash-indexes which can be much longer.

Environment

Windows XP, Tomcat 6.0.29, Activiti 5.0 alpha, MySQL 5.1.50-community UTF-8 innoDB

Assignee

Frederik Heremans

Reporter

Frederik Heremans

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure