Issue
A redo buffer calculation defect in the instant CHANGE COLUMN operation causes a crash.
Issue Triggering Scenarios
To calculate the size of log indexes, changes in column order should be considered, and the size of index information should also be recorded in the redo log. Originally, these columns were not accounted for. Performing an UPDATE operation immediately after executing an ALTER TABLE statement to modify column order causes a crash due to miscalculated redo log space.
Affected Kernel Versions
MySQL 8.0 20230704 and earlier versions.
Fixed Kernel Version
MySQL 8.0 20241005.
Check Methods
You can refer to the following commands to check for tables with potential risks.
select replace(name, '/', '.') as 'table_schema.table_name' from information_schema.innodb_tables where TOTAL_ROW_VERSIONS!=0 or INSTANT_COLS!=0;
Fixing Methods
2. After a kernel version upgrade, rebuild and repair the corrupted tables. You can use the method alter table xx engine = innodb; for repair. To avoid business impact caused by table locking, it is recommended to perform the repair during off-peak hours using tools such as pt-osc.