docs icon indicating copy to clipboard operation
docs copied to clipboard

Incorrect definition of table mysql.column_stats: after upgrade from 10.6.5 to 10.8.3 with docker container

Open nandokawka opened this issue 2 years ago • 3 comments

After upgrading the mariadb docker-container from 10.6.5 to 10.8.3 I am getting the following errors and the container crashes within a few seconds:

sqb_mariadb      | 2022-06-18 13:59:13 4 [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').
sqb_mariadb      | 2022-06-18 13:59:13 4 [ERROR] Incorrect definition of table
mysql.column_stats: expected column 'histogram' at
position 10 to have type longblob, found type varbinary(255).
...
sqb_mariadb      | 2022-06-18 13:59:13+00:00 [Note] [Entrypoint]: Backing up complete
sqb_mariadb      | 2022-06-18 13:59:13+00:00 [Note] [Entrypoint]: Starting mariadb-upgrade
sqb_mariadb      | Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
sqb_mariadb      | ERROR 2002 (HY000): Can't connect to server on 'sqb_mariadb' (115)
sqb_mariadb      | FATAL ERROR: Upgrade failed

The container is started through docker-compose:

version: '3'

services:

  sqb_mariadb:
    image: mariadb:latest
    container_name: sqb_mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF
    restart: unless-stopped
    volumes:
      - mariadb:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
      - MYSQL_DATABASE=sqb_nextcloud
      - MYSQL_ROOT_USER=root
      - MYSQL_HOST=sqb_mariadb
      - MYSQL_USER=sqb_admin
      - MARIADB_AUTO_UPGRADE=1
      - MARIADB_INITDB_SKIP_TZINFO=1

Repairing this like mentioned here: https://github.com/photoprism/photoprism/issues/2382 or here: https://community.home-assistant.io/t/mariadb-errors-after-update/424731/4 doesn't work due to the immediate crashing of the container.

Any hint on how to resolve the issue is appreciated!!!

Setting the version back to 10.6.5 leaves me with another error:

sqb_mariadb      | 2022-06-18 14:17:05 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.8.3.
sqb_mariadb      | 2022-06-18 14:17:05 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
sqb_mariadb      | 2022-06-18 14:17:05 0 [Note] InnoDB: Starting shutdown...
sqb_mariadb      | 2022-06-18 14:17:06 0 [ERROR] Plugin 'InnoDB' init function returned error.
sqb_mariadb      | 2022-06-18 14:17:06 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
sqb_mariadb      | 2022-06-18 14:17:06 0 [Note] Plugin 'FEEDBACK' is disabled.
sqb_mariadb      | 2022-06-18 14:17:06 0 [ERROR] Unknown/unsupported storage engine: InnoDB
sqb_mariadb      | 2022-06-18 14:17:06 0 [ERROR] Aborting

nandokawka avatar Jun 18 '22 14:06 nandokawka

https://jira.mariadb.org/browse/MDEV-28866 is the issue.

https://github.com/MariaDB/mariadb-docker/issues/439 or the JIRA above is a better place to report MariaDB issues.

grooverdan avatar Jun 18 '22 14:06 grooverdan

https://jira.mariadb.org/browse/MDEV-28866 is the issue.

MariaDB/mariadb-docker#439 or the JIRA above is a better place to report MariaDB issues.

Thank you for your fast response. The solution mentioned in (MariaDB/mariadb-docker/issues/439)[https://github.com/MariaDB/mariadb-docker/issues/439] unfortunately doesn't work for me. MARIADB_AUTO_UPGRADE=1 is already set.

Did I miss something in the links?

nandokawka avatar Jun 18 '22 14:06 nandokawka

Sorry for loosing track. The "other error" is downgrades aren't supported, you can't start up a 10.8 server shutdown and downgrade to 10.6.

grooverdan avatar Aug 26 '22 01:08 grooverdan