Bug #111043 Table data corrupt after upgrading MySql from 5.7.37 to MySql 8.0.33 version
Submitted: 16 May 2023 10:58 Modified: 16 May 2023 15:19
Reporter: Narendra Chamoli Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: DDL Severity:S1 (Critical)
Version:8.0.33 OS:Windows
Assigned to: CPU Architecture:Any
Tags: ALTER TABLE, Corrupt database, Inplace upgrade, Upgrade mysql 8

[16 May 2023 10:58] Narendra Chamoli
Description:
After doing MySql 8 upgrade as inplace of existing database & tables if user add any column to existing table then it is causing data corruption.

How to repeat:
Have MySql version 5.7.37 with existing Schemas & Table with data.

Upgrade to MySql version 8.0.33 as inplace (i.e., replacing MySql folder with MySql 8 zip and changing my.ini file as per 8).
https://dev.mysql.com/doc/refman/8.0/en/windows-upgrading.html#windows-upgrading-zip-distr...

Start the MySql service.

Run any alter command to add the column on any table with data.

This is causing all data corruption on that table.

Suggested fix:
As of now, before altering the table one has to Rebuild the table using:
https://dev.mysql.com/doc/refman/8.0/en/rebuilding-tables.html#rebuilding-tables-repair-ta...

MySql8 should automatically rebuild the table once upgraded as InPlace.
[16 May 2023 12:33] MySQL Verification Team
Hi Mr. Chamoli,

Thank you for your bug report.

We did our best to repeat the behaviour, but we were not able to repeat it.

We used latest 5.7 and 8.0 releases, which means 5.7.42 and 8.0.33. We created a set of tables with data and upgraded in-place with 8.0 release. It went without problems.

You could help us in repeating the behaviour if you you would send us a dump of the 5.7 table that was corrupted. We will again use 5.7.42 and not 5.7.37.

Can't repeat.
[16 May 2023 15:15] Tsubasa Tanaka
Is it a same issue which I faced?
https://bugs.mysql.com/bug.php?id=110702
[16 May 2023 15:19] Narendra Chamoli
Have you also altered the tables and added Column to the tables after Upgrading to MySql8?