Bug #109075 upgrade from 8.0.13 to 8.0.31 fails on Data Dictionary initialization
Submitted: 14 Nov 2022 10:57 Modified: 14 Nov 2022 16:17
Reporter: Tomas Kuba Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Data Dictionary Severity:S3 (Non-critical)
Version:8.0.31 OS:Ubuntu (20.04)
Assigned to: CPU Architecture:x86

[14 Nov 2022 10:57] Tomas Kuba
Description:
We are upgrading 8.0.13 to 8.0.31 (commercial), but it fails on initializing Data Dictionary

Log:
2022-11-14T10:09:25.388130Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-commercial) starting as process 8997
2022-11-14T10:09:25.388188Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file '/usr/share/mysql/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2022-11-14T10:09:25.403347Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=1069547520. Please use innodb_redo_log_capacity instead.
2022-11-14T10:09:25.406716Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-11-14T10:09:26.656325Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-11-14T10:09:26.668426Z 1 [System] [MY-011090] [Server] Data dictionary upgrading from version '80013' to '80023'.
2022-11-14T10:09:30.118014Z 1 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'INSERT INTO st_spatial_reference_systems SELECT * FROM mysql.st_spatial_reference_systems' failed with error code = 1292, error message = 'Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_altered' at row 2'.
2022-11-14T10:09:30.822237Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-11-14T10:09:30.822297Z 0 [ERROR] [MY-010119] [Server] Aborting

Database has following setting sql-mode = ""
We tried with these, but it had no effect.
sql-mode="ALLOW_INVALID_DATES"
sql_mode="ALLOW_INVALID_DATES"

Is there any way to handle this? Our DBs have 700GB+ and it is not easy for us to perform dump+import into a new DB.

How to repeat:
This is probably related to our database only, as it works with clean DB.

Install 8.0.13
Upgrade to 8.0.31
[14 Nov 2022 15:14] MySQL Verification Team
Hi Mr. Kuba,

Thank you for your bug report.

However, you have to check for all  the existing compatibility settings in your 8.0.13 setup. You must remove all those that are outdated, like the one noted.

All of these are mentioned in our Reference Manual.

Not a bug.
[14 Nov 2022 16:17] Tomas Kuba
We had to run mysql-debug (8.0.13) to get access to st_spatial_reference table and update all entries to not contain '0000-00-00 00:00:00' in created and last_altered columns. After that we were able to upgrade to 8.0.31
[15 Nov 2022 12:57] MySQL Verification Team
Hi Mr. Kuba,

Yes, that is expected behaviour.

A jump from 8.0.13 to 8.0.31 is too large ...... In future, try to upgrade more regularly .....