MCPcopy Create free account
hub / github.com/MariaDB/server / is_acl_user

Function is_acl_user

sql/sql_acl.cc:4561–4578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4559*/
4560
4561bool is_acl_user(const LEX_CSTRING &host, const LEX_CSTRING &user)
4562{
4563 bool res;
4564
4565 /* --skip-grants */
4566 if (!initialized)
4567 return TRUE;
4568
4569 mysql_mutex_lock(&acl_cache->lock);
4570
4571 if (*host.str) // User
4572 res= find_user_exact(host, user) != NULL;
4573 else // Role
4574 res= find_acl_role(user, false) != NULL;
4575
4576 mysql_mutex_unlock(&acl_cache->lock);
4577 return res;
4578}
4579
4580
4581/*

Callers 2

sp_process_definerFunction · 0.85
mysql_create_routineFunction · 0.85

Calls 2

find_user_exactFunction · 0.85
find_acl_roleFunction · 0.85

Tested by

no test coverage detected