Ad Widget

Collapse

How to set innodb to DYNAMIC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IteaAgain
    Junior Member
    • Mar 2018
    • 13

    #1

    How to set innodb to DYNAMIC

    Hello,
    i have updated my OS to debian 10 and my zabbix 4.2 to 6.
    Now i got the problem of
    query failed: [1118] Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs [alter table items drop column lastlogsize]
    3449:20230726:151236.942 query [alter table items drop column lastlogsize] failed, setting transaction as failed​
    i have read that i need to check my zabbix tables fort the row_format
    MariaDB [(none)]> SELECT NAME, ROW_FORMAT FROM information_schema.INNODB_SYS_TABLES WHERE ROW_FORMAT IN('Redundant', 'Compact') AND NAME NO
    T IN('SYS_DATAFILES', 'SYS_FOREIGN', 'SYS_FOREIGN_COLS', 'SYS_TABLESPACES', 'SYS_VIRTUAL', 'SYS_ZIP_DICT', 'SYS_ZIP_DICT_COLS');
    +-----------------------------------+------------+
    | NAME | ROW_FORMAT |
    +-----------------------------------+------------+
    | mysql/gtid_slave_pos | Compact |
    | zabbix/acknowledges | Compact |
    | zabbix/actions | Compact |
    | zabbix/alerts | Compact |
    | zabbix/application_discovery | Compact |
    | zabbix/application_prototype | Compact |
    | zabbix/application_template | Compact |
    ...
    ..
    | zabbix/proxy_history | Compact |
    | zabbix/regexps | Compact |
    | zabbix/rights | Compact |
    | zabbix/screen_user | Compact |
    | zabbix/screen_usrgrp | Compact |
    | zabbix/screens | Compact |
    | zabbix/screens_items | Compact |
    | zabbix/scripts | Compact |
    | zabbix/service_alarms | Compact |
    | zabbix/triggers | Compact |
    | zabbix/users | Compact |
    | zabbix/users_groups | Compact |
    | zabbix/usrgrp | Compact |
    | zabbix/valuemaps | Compact |
    | zabbix/widget | Compact |
    | zabbix/widget_field | Compact |
    +-----------------------------------+------------+
    144 rows in set (0,001 sec)​
    OK, so i need to set them to DYNAMIC.

    And that's my question. How to do that in one run and not table by table manually :-(
  • IteaAgain
    Junior Member
    • Mar 2018
    • 13

    #2
    well, seems not.

    I have created the list of zabbix tables, copied to a good editor, searched and replaced through that list till i had a SQL-script in the way of

    ...
    ALTER TABLE dbversion ROW_FORMAT=DYNAMIC;
    ALTER TABLE dchecks ROW_FORMAT=DYNAMIC;
    ALTER TABLE dhosts ROW_FORMAT=DYNAMIC;
    ALTER TABLE drules ROW_FORMAT=DYNAMIC;
    ALTER TABLE dservices ROW_FORMAT=DYNAMIC;
    ALTER TABLE escalations ROW_FORMAT=DYNAMIC;
    ALTER TABLE event_recovery ROW_FORMAT=DYNAMIC;
    ALTER TABLE event_suppress ROW_FORMAT=DYNAMIC;
    ALTER TABLE event_tag ROW_FORMAT=DYNAMIC;
    ALTER TABLE events ROW_FORMAT=DYNAMIC;
    ALTER TABLE expressions ROW_FORMAT=DYNAMIC;
    ALTER TABLE functions ROW_FORMAT=DYNAMIC;
    ALTER TABLE globalmacro ROW_FORMAT=DYNAMIC;
    ALTER TABLE globalvars ROW_FORMAT=DYNAMIC;
    ALTER TABLE graph_discovery ROW_FORMAT=DYNAMIC;
    ALTER TABLE graph_theme ROW_FORMAT=DYNAMIC;​
    ...
    and feed that to mysql

    mysql zabbix < mysqlscript.sql
    i took quite a while to proceed, but as long as no output happened everything is fine :-)

    Comment

    Working...