Bug #99147 why does mysql_upgrade.exe always change some files under mysql database
Submitted: 1 Apr 2020 10:14 Modified: 2 Apr 2020 13:58
Reporter: Hu Vincent Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.30 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Other (windows x64 )

[1 Apr 2020 10:14] Hu Vincent
Description:
Hi, 
   I just found mysql_upgrade.exe always change some mysql system tables every time although they are already the latest ones. I was wondering if it is as expected.

 

How to repeat:
1) download mysql 5.6.30 enterprise archive version(win x64), and extract the zip file.
2) copy its data folder to somewhere, then start mysqld by: 
mysqld --datadir="c:\winnie\data" --port=48963 --user=root --default-storage-engine=myisam 
3) do upgrade by: mysql_upgrade.exe --protocol=TCP --port=48963 --user=root
4) then copy the data folder to somewhere and name it as  data_upgraded_1
5) go back the data folder, and delete the file mysql_upgrade_info. then do upgrade again.rename the data folder to data_upgrade_2.
6) if you use winmerge tool to compare the two folders(data_upgraded_1 vs data_upgraded_2), you'll find some files have been changed.
   it's weird, The tables schema are already latest, what have been changed during each upgrade operation?
[2 Apr 2020 1:14] Hu Vincent
compare files between data_upgrade_1 and  data_upgrade_2

Attachment: upgrade_compare.png (image/png, text), 98.15 KiB.

[2 Apr 2020 13:58] MySQL Verification Team
Hi,

Yes, this is expected behavior.

Note, mysql_upgrade is deprecated in modern MySQL.

all best
Bogdan