先日行ったmariadbのupgrade後にログを見たらこのようなログがつらつらと・・・
Jul 30 04:21:05 hoge mariadbd[2163]: 2023-07-30 4:21:05 29113 [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').
Jul 30 04:21:05 hoge mariadbd[2163]: 2023-07-30 4:21:05 29113 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
Jul 30 04:21:05 hoge mariadbd[2163]: 2023-07-30 4:21:05 29113 [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').
Jul 30 04:21:05 hoge mariadbd[2163]: 2023-07-30 4:21:05 29113 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
mariadbのupgrade後にmariadb-upgradeコマンドでデーターベースのアップグレードの実行を行っていなかったので出てました。
なので、mariadb-upgradeを実行
# mariadb-upgrade -u root -p
Enter password:
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.index_stats OK
mysql.innodb_index_stats OK
略
sys
sys.sys_config OK
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
実行後エラーは表示されなくなりました。