Description:
Mysql 5.7.44 can be upgraded in-place to 8.0 up to 8.0.19
Upgrade of the same database from version 5.7.44 to 8.0.45,
or from 8.0.19 to 8.0.45, fails because undo_001/undo_002 cannot be created - tablespace ID used for them are from existing tables.
Errors for upgrade 5.7.44 -> 8.0.45
2026-03-02T15:33:30.179729Z 1 [Note] [MY-012905] [InnoDB] Cannot create ./undo_001 because ./db/tbl.ibd already uses Space ID=4255581912! Did you change innodb_undo_directory?
2026-03-02T15:33:30.179767Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Invalid Filename.
2026-03-02T15:33:30.364701Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine.
2026-03-02T15:33:30.365002Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2026-03-02T15:33:30.365051Z 0 [ERROR] [MY-010119] [Server] Aborting
Errors for upgrade 8.0.19 -> 8.0.45
2026-03-02T19:24:21.029710Z 1 [Note] [MY-013252] [InnoDB] Using undo tablespace './undo_001'.
2026-03-02T19:24:21.030658Z 1 [Note] [MY-013252] [InnoDB] Using undo tablespace './undo_002'.
2026-03-02T19:24:21.031162Z 1 [Note] [MY-013261] [InnoDB] Cannot use ./db/tbl.ibd as an undo tablespace because it does not end with '.ibu'.
2026-03-02T19:24:21.031180Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Invalid Filename.
2026-03-02T19:24:21.495525Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2026-03-02T19:24:21.495864Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2026-03-02T19:24:21.495925Z 0 [ERROR] [MY-010119] [Server] Aborting
Upgrade from 5.7 works also for revisions before 8.0.19
Upgarde from 8.0.19 fails also for revisions before 8.0.45 - like 8.0.43/8.0.21
Server is SUSE Linux Enterprise Server 15 SP6
How to repeat:
application that uses the database heavily uses temporary tables - creates/destroys a lot of them daily.
Suggested fix:
check if tablespace ID is in use before assigning it to undo files during the upgrade