Bug #68834 please record mysql upgrade information inside the mysql database
Submitted: 2 Apr 2013 13:43 Modified: 2 Apr 2013 20:53
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.6.10 and earlier OS:Any
Assigned to: CPU Architecture:Any

[2 Apr 2013 13:43] Simon Mudd
Description:
When upgrading a mysql server several tasks are needed. one of those is to run mysql_upgrade.
However, there's no information directly inside the database which indicates if this has been run, when and which version of mysql_upgrade was used.

I know there is information in rpms that's tries to store this information but it seems better to record attempts to run mysql upgrade in a mysql table simply as reference information.  This makes tracking failures or unexpected behaviour easier, especially in an environment where servers are being cloned heavily.

How to repeat:
Look inside the database for information regarding any changes due to upgrades and you'll see nothing.

Suggested fix:
Please add a log table which records:

- a timestamp of when the mysql_upgrade action took place
- the hostname of the server being upgraded (mysql_upgrade will need to provide this information)
- the @@hostname as this is static once the server has been started and may not match the hostname
- the mysql_upgrade version that was run
- the status of the upgrade which could be succeeded, forced, no change, ....
- perhaps a counter of the number of tables checked
- an indication of different flags used like --upgrade-system-tables or --write-binlog

Whether mysql_upgrade wants to use this information or not is up to you, but I'd like to see this history as it can be helpful diagnosing issues, and we have instances which used to run MySQL versions prior to 5.0 and having some of that upgrade history available especially when switching major versions would indeed be rather useful. I don't expect storage of this to be very large as there's only ever likely to be a couple of rows per major version.
[2 Apr 2013 14:30] MySQL Verification Team
This would be a nice addition to mysql_upgrade.
[24 Jun 2020 6:17] Umar Iftikhar
it not the Big task , please fix it ASAP
[24 Jun 2020 7:24] MySQL Verification Team
This isn't relevant for MySQL 8.0 since there is no mysql_upgrade.