[debian-mysql] help fixing cacti to work with MariaDB

Otto Kekäläinen otto at seravo.fi
Thu Feb 25 21:02:57 UTC 2016


Hello Paul!

The "Specified key was too long; max key length is 1000 bytes" stems
from the fact that in InnoDb the maximum key lengt is shorter than in
MyISAM. I suspect Cacti is old and originally developed using MyISAM,
and not tested with modern InnoDB. This backwards compatibility issue
applies to both MariaDB and MySQL.

The solution is to change the CREATE TABLE definition so that the key
is shorter.

http://stackoverflow.com/questions/8746207/1071-specified-key-was-too-long-max-key-length-is-1000-bytes

Changing collation shortens the amount of bytes the key consumes, but
that does not seem like a future-proof solution. Can you check if in
Cacti the key length can be shortened and maybe file a bug on upstream
Cacti?



2016-02-25 22:14 GMT+02:00 Paul Gevers <elbrus at debian.org>:
> Hi all,
> [Please CC me, I am not subscribed].
>
> Recently I started to look into how to fix bug 813422¹ "cacti can't be
> installed on MariaDB server". It seems that I can work-around/fix the
> issue "Specified key was too long; max key length is 1000 bytes" by
> changing the sql template for the database by adding a "collate
> ascii_general_ci" in three places (see attached patch).
>
> Now I expect that this is the result of defaults for collation being
> different on MariaDB than they were (and are?) on MySQL. Before I start
> bugging upstream I like to know if I am correct in this understanding
> and if this is something Debian specific or MariaDB specific.
>
> Does the fix/work-around sound remotely sane?
>
> Thanks for your time and effort.
>
> Paul
>
> ¹ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813422
>
> _______________________________________________
> pkg-mysql-maint mailing list
> pkg-mysql-maint at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-mysql-maint



-- 
Check out our blog at http://seravo.fi/blog
and follow @ottokekalainen



More information about the pkg-mysql-maint mailing list