WL#8350: ENSURE 5.7 SUPPORTS SMOOTH LIVE UPGRADE FROM 5.6

Affects: Server-5.7   —   Status: Complete

The upgrade procedure from 5.6 to 5.7 should be :
1. stop the 5.6 server.
2. upgrade the binaries
3. run the 5.7 server over the 5.6 server's database with *no* special
options
4. run 5.7's version of mysql_upgrade
5. restart the server.

Nothing more, nothing less.
F-1: During the upgrade process the 5.7 binaries should work with 5.6 database
layout without specifying --skip-grant-tables option. 

In order to achieve this the
authentication process during the update need to make use of
mysql.user table in the following way:

NF-1: If plugin field is empty and password length (=16 bytes) indicates
mysql_old_password plugin we skip this account as the support for
mysql_old_password was removed in 5.7
NF-2: If plugin field is empty and password length (= 41 bytes) indicates
mysql_native_password plugin we use this account as if plugin field was equal to
mysql_native_password.
NF-3: If plugin field is not empty and the authentication string is not empty we
use authentication string to validate the user (instead of using password when
available - current behavior)
NF-4: During the update - the server needs to automatically verify whether it is
working with 5.6 database layout and if so execute the above scenario.
NF-5: The above scenario will only work for starting the server (acl_load()) and
for FLUSH PRIVILEGES (acl_reload()).
NF-6: No user manipulation commands (e.g. ALTER USER/SET PASSWORD etc) will work
on the non-upgraded users. 

The changes between 5.6 and 5.7 mysql.user table that interest us are - the
plugin filed cannot be null and password field has been removed.
See the related BUG#75723