mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 16:54:15 +01:00
MDEV-17942 fixup : protect rebuild_check_host() / rebuild_role_grants() with acl_cache->lock mutex
This commit is contained in:
parent
39a2984dc0
commit
d9f7b6be5a
1 changed files with 7 additions and 6 deletions
|
@ -9573,16 +9573,17 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list, bool handle_as_role)
|
|||
}
|
||||
}
|
||||
|
||||
if (result && some_users_dropped && !handle_as_role)
|
||||
{
|
||||
/* Rebuild in-memory structs, since 'acl_users' has been modified */
|
||||
rebuild_check_host();
|
||||
rebuild_role_grants();
|
||||
}
|
||||
|
||||
mysql_mutex_unlock(&acl_cache->lock);
|
||||
|
||||
if (result)
|
||||
{
|
||||
if (some_users_dropped && !handle_as_role)
|
||||
{
|
||||
/* Rebuild in-memory structs, since 'acl_users' has been modified */
|
||||
rebuild_check_host();
|
||||
rebuild_role_grants();
|
||||
}
|
||||
my_error(ER_CANNOT_USER, MYF(0),
|
||||
(handle_as_role) ? "CREATE ROLE" : "CREATE USER",
|
||||
wrong_users.c_ptr_safe());
|
||||
|
|
Loading…
Add table
Reference in a new issue