amfetreon <
amfetr...@MAIL.RU> wrote:
> I have a need to leave comments in language other than English.
> When i do so, in Gerrit, i get comments shown as "?" symbols. I've
> tried to rebuild MySql db in utf8 encoding,
Ugh. Don't use MySQL?
> and got "MySQLSyntaxErrorException: Specified key was too long" error.
Yup. MySQL doesn't actually use utf8 encoding. They use utf24 or
something equally insane. Which means that the primary key of the
table is now too large, because the number of bytes it requests is
longer than what MySQL permits in an index key.
You might be able to get this to work by dumping the database and
hand-editing the patch_comments primary key columns to use shorter
lengths. E.g. decrease file_name from 255 to 100.
Though how small you can go depends on the longest file path,
from the top directory of any project. Within Android (lots of
Java files), the longest we have right now is 133 characters.
uuid seems to be around 33 characters, so decreasing that below 40
might not be a good idea.
I don't know if you can configure the file_name to be latin1 and
the message column to be utf8 in the same table. You might be able
to look into that.
In general I try to avoid MySQL and instead use PostgreSQL or H2.
They don't suffer from these sorts of strange limitations.
--
To unsubscribe, email
repo-discuss...@googlegroups.com
More info at
http://groups.google.com/group/repo-discuss?hl=en