Skip to content

Commit

Permalink
MDEV-26637: (roles) ASAN: main.metadata and user_variables.basic MTR …
Browse files Browse the repository at this point in the history
…failures after MDEV-26572

No empty name roles exists (no sens to look for).
The problem already present in our test cases.
  • Loading branch information
sanja-byelkin committed Oct 12, 2021
1 parent 8f7edb7 commit 3c0f48a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sql/sql_acl.cc
Expand Up @@ -4259,14 +4259,18 @@ static ACL_USER * find_user_wild(const char *host, const char *user, const char
*/
static ACL_ROLE *find_acl_role(const char *role)
{
size_t length= strlen(role);
DBUG_ENTER("find_acl_role");
DBUG_PRINT("enter",("role: '%s'", role));
DBUG_PRINT("info", ("Hash elements: %ld", acl_roles.records));

mysql_mutex_assert_owner(&acl_cache->lock);

if (!length)
DBUG_RETURN(NULL);

ACL_ROLE *r= (ACL_ROLE *)my_hash_search(&acl_roles, (uchar *)role,
strlen(role));
length);
DBUG_RETURN(r);
}

Expand Down

0 comments on commit 3c0f48a

Please sign in to comment.