Hello, Sergei! On Mon, 7 Oct 2024 at 22:52, Sergei Golubchik <serg@mariadb.org> wrote:
This is how to enable hash_password() for empty passwords:
--- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2341,7 +2341,7 @@ static int set_user_auth(THD *thd, const LEX_CSTRING &user, res= ER_NOT_VALID_PASSWORD; goto end; } - if (pwtext.length) + if (!auth->auth_string.length) { if (info->hash_password) { @@ -2356,7 +2356,7 @@ static int set_user_auth(THD *thd, const LEX_CSTRING &user, auth->auth_string.str= (char*)memdup_root(&acl_memroot, buf, len+1); auth->auth_string.length= len; } - else + else if (pwtext.length) { res= ER_SET_PASSWORD_AUTH_PLUGIN; goto end;
Indeed. Fixing it this way resolves all the problems. Please see commits c3e28ca <https://github.com/MariaDB/server/commit/c3e28ca1178a8006b8dac955a27fba8bcea57c7a> and 06e4583 <https://github.com/MariaDB/server/commit/06e4583a2e0dc990b37af134573698ce4f8e5132> with the new updates. -- Yours truly, Nikita Malyavin