Bug #118168 MySQL data dictionary fails to upgrade at startup with lock timeout on ALTER TABLE
Submitted: 12 May 12:27 Modified: 12 May 18:59
Reporter: Justin Swanhart Email Updates:
Status: Need Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:8.0.41 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[12 May 12:27] Justin Swanhart
Description:
2025-05-12T12:15:39.980381Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-05-12T12:15:40.735903Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-05-12T12:15:41.269157Z 4 [System] [MY-013381] [Server] Server upgrade from '80039' to '80041' started.
2025-05-12T12:16:31.923113Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'ALTER TABLE slave_worker_info STATS_PERSISTENT=0; ' failed with error code = 1205, error message = 'Lock wait timeout exceeded; try restarting transaction'.
2025-05-12T12:16:31.924793Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2025-05-12T12:16:31.924814Z 0 [ERROR] [MY-010119] [Server] Aborting

How to repeat:
Restore a backup from 8.0.39
Try to start the database on 8.0.41
Upgrade fails and database is left in unusable state (sev 1 problem)

Suggested fix:
unsure
[12 May 13:33] Justin Swanhart
I restored the next full backup and the server upgraded successfully so this problem won't hit every upgrade.  I guess I just got unlucky.  Still this is a serious problem for some upgrades but it isn't easily reproducible.
[12 May 18:59] MySQL Verification Team
Hi,

How did you "restore backup" ?

Thanks.