Upgrade 30.3 to 32.1: mysql.column_stats Error

162 views
Skip to first unread message

Jonas Widmer

unread,
May 1, 2024, 3:40:35 AM5/1/24
to inception-users
Hello
I'm running Inception through Docker Compose and just wanted to upgrade (after a backup) from 30.3 (MariaDB 10.7) to 32.1 (MariaDB 10.11).
In the docker-compose.yml I changed the db and app versions, and JAVA_OPTS to JAVA_MEM_OPTS (double checked it with https://inception-project.github.io/releases/32.1/docs/admin-guide.html#sect_docker).
I removed the containers (probably not a great decision) and restarted the docker compose.

In the first run, there was an error starting the db-container:
[ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.7.8. You must start up and shut down MariaDB 10.7 or earlier.
So I restarted 32.1 with MariaDB 10.7 and it worked.

But since I wanted to upgrade to MariaDB 10.11 too, I changed it again in the Docker Compose file. And it started without this error.

Now Inception runs, but I'm constantly getting type errors in mysql.column_stats:
db-1   | 2024-05-01  6:39:41 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').
db-1   | 2024-05-01  6:39:41 4 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).

Any way I can fix this? Manually in the db-container through an SQL query? Or a better upgrade practice?
Thanks for any help in advance!
Best, Jonas

Richard Eckart de Castilho

unread,
May 1, 2024, 3:43:58 AM5/1/24
to incepti...@googlegroups.com
Hi Jonas,

> On 1. May 2024, at 09:19, Jonas Widmer <jonas....@unibe.ch> wrote:
>
> But since I wanted to upgrade to MariaDB 10.11 too, I changed it again in the Docker Compose file. And it started without this error.
>
> Now Inception runs, but I'm constantly getting type errors in mysql.column_stats:
> db-1 | 2024-05-01 6:39:41 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').
> db-1 | 2024-05-01 6:39:41 4 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
>
> Any way I can fix this? Manually in the db-container through an SQL query? Or a better upgrade practice?

I believe upgrading MariaDB requires more actions than just changing the version of the image in the compose file.
In particular, the `mariadb-upgrade` command is usually involved. This is run automatically when you do an update
via e.g. `apt install`, but probably not when you just change the image version.

Please refer to the MariaDB upgrade guide for more details:

https://mariadb.com/kb/en/upgrading-from-mariadb-10-6-to-mariadb-10-11/

Cheers,

-- Richard

Jonas Widmer

unread,
May 1, 2024, 4:59:23 AM5/1/24
to inception-users
Hi Richard

Thanks a lot for the fast answer and the upgrade-hint!
I was struggling with the privileges inside the container (MYSQL_RANDOM_ROOT_PASSWORD: yes), but I just set the following env-variable in the docker-compose.yml:
MARIADB_AUTO_UPGRADE: 1

Now it works fine.
Thanks again and cheers,
Jonas
Reply all
Reply to author
Forward
0 new messages