[sr-dev] MySQL max index length and DB structure

Jasmin Schnatterbeck js at data-cmr.net
Thu Mar 14 16:02:33 CET 2013


Hi,

when upgrading to kamailio 3.3 I have noticed, that in the database 
structure new indexes are present (e.g. in presence module).

The problem is, that some of those indexes are too long for mysql, if 
the DB charset is utf8 (mysql calculates several bytes per character): 
"Specified key was too long; max key length is 1000 bytes".

This is a very well-known limitation in mysql:
http://bugs.mysql.com/bug.php?id=4541

... and I think we can not expect this behaviour to be changed in future 
versions of mysql (at least that is what comments like "redesign your 
table" or "table design is bad" indicate).

Not using utf8 at all is (in my opinion) not really a solution.

That means, that mysql-support for the DB structure is somewhat limited...?
What about MariaDB as an alternative?

Cheers
Jasmin



More information about the sr-dev mailing list