fix the test for the empty password hash string

because the first byte of a _binary hash_ can be 0x00 too.

This fixes main.connect test on centos73-ppc64
This commit is contained in:
Sergei Golubchik 2018-11-28 12:20:37 +01:00
parent 1db6c3a207
commit 3df7287d21

View file

@ -13583,7 +13583,7 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
pkt_len= (int)strnlen((char*)pkt, pkt_len);
if (pkt_len == 0) /* no password */
return info->auth_string[0] ? CR_AUTH_USER_CREDENTIALS : CR_OK;
return info->auth_string_length ? CR_AUTH_USER_CREDENTIALS : CR_OK;
if (secure_auth(thd))
return CR_AUTH_HANDSHAKE;