-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
None
-
None
The problem manifests itself when I try to set up Confluence on MySQL 4.1 with UTF-8 support. I followed the instructions in the setup to enable UTF-8 support by adding "&useUnicode=true&characterEncoding=utf8" to the JDBC URL. When I do this, the following is reported in the console:
create table OS_PROPERTYENTRY (entity_name VARCHAR(125) not null, entity_id BIGINT not null, entity_
key VARCHAR(255) not null, key_type INTEGER, boolean_val BIT, double_val DOUBLE PRECISION, string_va
l VARCHAR(255), long_val BIGINT, int_val INTEGER, date_val DATETIME, primary key (entity_name, entit
y_id, entity_key))
Nov 10, 2004 7:58:30 PM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: Unsuccessful: create table OS_PROPERTYENTRY (entity_name VARCHAR(125) not null, entity_id BI
GINT not null, entity_key VARCHAR(255) not null, key_type INTEGER, boolean_val BIT, double_val DOUBL
E PRECISION, string_val VARCHAR(255), long_val BIGINT, int_val INTEGER, date_val DATETIME, primary k
ey (entity_name, entity_id, entity_key))
Nov 10, 2004 7:58:30 PM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: Syntax error or access violation message from server: "Specified key was too long; max key l
ength is 1024 bytes"
Because a UTF-8 character is stored as three bytes in MySQL the maximum key length can only be 1024/3 characters long. The compound key in the os_propertyentry table seems to be violating this constraint.
The issue is described in the MySQL issue tracker at http://bugs.mysql.com/bug.php?id=4541.
- duplicates
-
CONFSERVER-2783 MySQL error in setup: Specified key was too long
- Closed
- is related to
-
CONFSERVER-3306 Update os-propertyset key size to ensure that it works with mysql
- Closed