more UTF-8 problems
Tarjei Huse <tarjei-y/[email protected]>
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <1138467407.5057.108.camel@localhost> |
Hi,
When adding /midcom_dbobjects_full.sql
I get:
ERROR 1071 (42000) at line 1: Specified key was too long; max key length
is 1000 bytes
This is due to the DB beeing Utf-8 and thus each char is 3 bytes instead
of 1.
I modified the table midcom_group_virtual to this:
CREATE TABLE midcom_group_virtual
(
id INT(11) unsigned NOT NULL auto_increment,
component VARCHAR(200) NOT NULL DEFAULT '',
identifier VARCHAR(133) NOT NULL DEFAULT '',
name VARCHAR(200) NOT NULL DEFAULT '',
sitegroup INT(11) NOT NULL DEFAULT 0,
metadata_size INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (id),
UNIQUE INDEX midcom_virtual_group_idx(component, identifier),
INDEX midcom_virtual_group_sitegroup_idx(sitegroup)
);
The number 133 is what I came to by testing. I also added unsigned to
the id, but I'm not sure if that was usefull.
Links:
http://bugs.mysql.com/bug.php?id=4541
http://bugzilla.wikipedia.org/show_bug.cgi?id=1322
Suffice to say: We are not the only ones with this problem.
Tarjei