[MDEV-28866] mariadb-upgrade to 10.8 mysql.column_stats hist_type + histogram errors Created: 2022-06-16  Updated: 2022-07-11  Resolved: 2022-07-11

Status: Closed
Project: MariaDB Server
Component/s: Upgrades
Affects Version/s: 10.8.3
Fix Version/s: 10.8.4, 10.9.2

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 2
Labels: not-10.7

Issue Links:
Relates
relates to MDEV-26710 Histogram field in mysql.column_stats... Closed

 Description   

From https://github.com/MariaDB/mariadb-docker/issues/438

Phase 4/7: Running 'mysql_fix_privilege_tables'
2022-06-11  6:03:58 10 [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').
2022-06-11  6:03:58 10 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
2022-06-11  6:03:58 10 [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').
2022-06-11  6:03:58 10 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
2022-06-11  6:04:01 10 [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

Confirmed with 10.3.34, 10.5.15 and 10.6.7 as the source version before the upgrade.



 Comments   
Comment by Nando Schneider [ 2022-06-18 ]

Can confirm this issue for the upgrade from 10.6.5

Comment by Daniel Black [ 2022-06-19 ]

Upon analysis the mariadb-upgrade, despite the very large amount of noise, was actually successful. Because the mysql.column_stats was one of the last table to be corrected, the previous ALTER TABLE sql statements in the mariadb-upgrade all caused errors to be emitted by the server.

Per the output in the mariadb-docker issue "2022-06-11 06:04:11+00:00 [Note] [Entrypoint]: Finished mariadb-upgrade" did occur so it was completed.

A correction is in review https://github.com/MariaDB/server/pull/2166 to make the output less noisy. I'm yet to confirm what makes 10.8 noisy here.

Comment by Vicențiu Ciorbaru [ 2022-07-11 ]

Reviewed upgrade scenarios and commented in https://github.com/MariaDB/server/pull/2166.

Also reviewed GTID number change in test case caused by add_suppression procedure's INSERT statement.

OK to push.

Generated at Thu Feb 08 10:04:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.