Bug #103048 Upgrade process fails from 5.7.26 to 8.0.18 with MY-010520 / MY-010767 errors
Submitted: 19 Mar 2021 17:02 Modified: 22 Mar 2021 15:45
Reporter: Aimilios Tsouvelekakis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:8.0.18 OS:CentOS (7.8)
Assigned to: CPU Architecture:x86

[19 Mar 2021 17:02] Aimilios Tsouvelekakis
Description:
We tried to upgrade one of our databases from 5.7.26 to 8.0.18. We followed the standard procedure suggested by mysql documentation.

The table names contain the character "-" which is encoded as @002d.
In INFORMATION_SCHEMA.TABLES they are listed with -
In INFORMATION_SCHEMA.INNODB_SYS_TABLES they are listed with @002d and the same on the file system.

It seems like, the upgrade process is not able to match what is in the TABLES dict with what is on the File System, and in the INNODB_SYS_TABLES and the instance does not start with errors:

2021-03-19T12:29:57.253379Z 1 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'table_name-C_S_S'
2021-03-19T12:29:57.254101Z 1 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'table_name-C_S_E'
2021-03-19T12:29:57.268449Z 1 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'TABLENAME-C_D'
2021-03-19T12:29:57.369277Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-XXXX
2021-03-19T12:29:57.377631Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-ZZZZZ
2021-03-19T12:29:57.391874Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-AAA
2021-03-19T12:29:57.413899Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-aa
2021-03-19T12:29:57.434450Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-s_d
2021-03-19T12:29:57.487866Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-C_S
2021-03-19T12:29:57.509784Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for DATABASE.TABLENAME-Dd

How to repeat:
1) Create a table with the following pattern name of the table: test-123 in version 5.7.26
2) upgrade the database to 8.0.18
3) See if the database reports problems MY-010520 and MY-010767 after upgrade.
[19 Mar 2021 17:30] MySQL Verification Team
Please try latest version 8.0.23. Thanks.

https://dev.mysql.com/downloads/mysql/
[22 Mar 2021 14:21] Aimilios Tsouvelekakis
Good afternoon,

thank you very much for your prompt reply.

Indeed after creating a clone of the database and testing the 8.0.23 works. Do you happen to know why this happens? I searched all the release logs(from 8.0.19-23) for reference either on the errors or for utf-8/unicode/identifiers but i could not find anything. 

Furthermore, just to add more to my research, I tested one new instance on 5.7.26 and I created a table with a dash. Upgrade from 5.7.26 to 8.0.18 and it worked.

The difference with our current instance is that the instance we tried to upgrade has been upgraded through several mysql versions.

Do you happen to know what is going on?
[22 Mar 2021 15:21] MySQL Verification Team
Thank you for the feedback and good to know 8.0.23 worked. Sorry but I searched about and wasn't able to find a reason, so I assume some fix among the older and last  release was the reason for.
[22 Mar 2021 15:45] Aimilios Tsouvelekakis
I thought you may know something more since you suggested 8.0.23 and not 8.0.25 or 8.0.20. Shall i consider the 8.0.23 the most stable release?

I want to do a test because I have the feeling this is not a problem with directly the upgrade but with the binaries. Since I have both versions to try upgrade to 8.0.18 with the upgrade process but use the mysql 8.0.23 after the upgrade like performing an in-place upgrade. Probably this will run succesfully, i only need to redirect my systemctl file to call the proper mysql daemon.

A bit unorthodox and cumbersome but it will provide us an idea.
[22 Mar 2021 16:10] MySQL Verification Team
I asked you to test the last release because is the correct process in verify a bug since not exist to back port fix for older versions is asked to file the bug against the current version. When a bug isn't repeated with current version the process is ended.