MariaDB causes system overload after update to 10.11.9-150600.4.6.1 on Leap 15.6

The error log of the mariadb instances fill with

Blockquote
2025-01-09 10:18:11 22 [ERROR] Incorrect definition of table mysql.column_stats: expected column ‘hist_type’ at position 9 to have type enum(‘SINGLE_PREC_HB’,‘DOUBLE_PREC_HB’,‘JSON_HB’), found type enum(‘SINGLE_PREC_HB’,‘DOUBLE_PREC_HB’). 2025-01-09 10:18:11 22 [ERROR] Incorrect definition of table mysql.column_stats: expected column ‘histogram’ at position 10 to have type longblob, found type varbinary(255).
Blockquote

This happened after zypper up during which MariaDB was updated.

The table definition of mysql.columsn_stats is

Blockquote
Field;Type;Null;Key;Default;Extra
db_name;varchar(64);NO;PRI;;
table_name;varchar(64);NO;PRI;;
column_name;varchar(64);NO;PRI;;
min_value;varbinary(255);YES;;;
max_value;varbinary(255);YES;;;
nulls_ratio;decimal(12,4);YES;;;
avg_length;decimal(12,4);YES;;;
avg_frequency;decimal(12,4);YES;;;
hist_size;tinyint(3) unsigned;YES;;;
hist_type;enum(‘SINGLE_PREC_HB’,‘DOUBLE_PREC_HB’);YES;;;
histogram;varbinary(255);YES;;;
Blockquote
which seems as described in https://mariadb.com/kb/en/mysqlcolumn_stats-table/ except for column histogram.

How can I fix this problem? The error log grows to 1GB per day and the server gets unresponsive after some hours…

Your linked article explains the fix at the end. You need to manually update the statistics table so that the histogram column contains the correct type.

1 Like

Thank you for your fast reply; I will read the article, (try to) fix it and give feedback to this topic.

The article states

Blockquote
One should modify the table(s) with regular INSERT/UPDATE/DELETE statements.
Blockquote

But to change the type of column I would need to use ALTER TABLE on mysql.column_stats. Is there no chance I make the situation worse by altering the table definition?
I ran mariadb-check on the table and that merely produced an OK.

Sorry for the interruption.
You use the " (Blockquote) button for quotesing. It is the idea that you then replace the word Blockquote with your quote.

Also when it is a normal text you want to quote that is the correct usage of ", but when when you want to show computer text (from e.g. a terminal emulator) it is much better to use the </> (Preformatted text) button instead.

Thank you, I use this forum rarely to create posts, so your comments are welcome and I will try to use them properly.

Hui, after making backups I changed the data types with ALTER TABLE and the errors are gone.
Thank you for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.