From b301fdf56949974bc52e160220e8b9213d674d4b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 25 Aug 2020 17:57:25 +0200 Subject: [PATCH] Reduce index key size on el6 --- zabbix.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zabbix.spec b/zabbix.spec index 0470679..4216209 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -480,6 +480,12 @@ gzip database/postgresql/create.sql gzip database/postgresql/timescaledb.sql # sql files for proxyes +%if 0%{?rhel} == 6 +# MySQL on el6 doesn't support such large keys +sed -i -e \ + 's/CREATE INDEX `items_1` ON `items` (`hostid`,`key_`(1021));/CREATE INDEX `items_1` ON `items` (`hostid`,`key_`(900));/' \ + database/mysql/schema.sql +%endif gzip database/mysql/schema.sql gzip database/postgresql/schema.sql gzip database/sqlite3/schema.sql