Bug #78615 Make mysql_upgrade log it's version
Submitted: 29 Sep 2015 6:28 Modified: 12 Oct 2015 5:11
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[29 Sep 2015 6:28] Simon Mudd
mysql_upgrade does what it's supposed to but one thing it does not do is confirm which version it is.

How to repeat:
When upgrading you may be swapping binaries around and it's possible that by mistake you run the wrong version of mysql_upgrade or you have access to different binaries in your path.
Or simply that if something goes wrong you are not 100% sure which version had run. 

Suggested fix:
Therefore it would be good if the mysql_upgrade binary would log as the first thing it does the version that it corresponds to. This then avoids any doubt about whether the user ran the wrong version when checking behaviour or if seeing any issues.

This should be a trivial change and it simply allows one to be sure that they ran the right version of the command at the right time. The upgrade process is not run that frequently and different people may do things differently so this "safety check" would be helpful.
[29 Sep 2015 6:31] Mark Leith
It could also compare the version if the server it is trying to upgrade against its own version as a "safety check"..
[29 Sep 2015 7:48] MySQL Verification Team
If i run an older (5.7.8) mysql_upgrade against my latest 5.8.0 it errors out:

Checking if update is needed.
Checking server version.
Error: Server version (5.8.0-m17) does not match with the version of
the server (5.7.8-rc) with which this program was built/distributed. You can
use --skip-version-check to skip this check.
[12 Oct 2015 5:11] MySQL Verification Team
Hello Simon,

Thank you for the feature request!