MySQL 8.0.39
Source Code Documentation
|
Cache to store the Restrictions of every auth_id. More...
#include <sql_auth_cache.h>
Public Member Functions | |
Acl_restrictions () | |
Construstor. More... | |
Acl_restrictions (const Acl_restrictions &)=delete | |
Acl_restrictions (Acl_restrictions &&)=delete | |
Acl_restrictions & | operator= (const Acl_restrictions &)=delete |
Acl_restrictions & | operator= (Acl_restrictions &&)=delete |
void | remove_restrictions (const ACL_USER *acl_user) |
Remove the Restrictions of the ACL_USER. More... | |
void | upsert_restrictions (const ACL_USER *acl_user, const Restrictions &restriction) |
Update, insert or remove the Restrictions for the ACL_USER. More... | |
Restrictions | find_restrictions (const ACL_USER *acl_user) const |
Find the Restrictions of the ACL_USER. More... | |
size_t | size () const |
Private Attributes | |
malloc_unordered_map< std::string, Restrictions > | m_restrictions_map |
Cache to store the Restrictions of every auth_id.
This cache is not thread safe. Callers must acquire acl_cache_write_lock before to amend the cache. Callers should acquire acl_cache_read_lock to probe the cache.
Acl_restrictions is not part of ACL_USER because as of now latter is POD type class. We use copy-POD for ACL_USER that makes the explicit memory management of its members hard.
Acl_restrictions::Acl_restrictions | ( | ) |
Construstor.
|
delete |
|
delete |
Restrictions Acl_restrictions::find_restrictions | ( | const ACL_USER * | acl_user | ) | const |
Find the Restrictions of the ACL_USER.
[in] | acl_user | The ACL_USER for whom to find the Restrictions |
|
delete |
|
delete |
void Acl_restrictions::remove_restrictions | ( | const ACL_USER * | acl_user | ) |
Remove the Restrictions of the ACL_USER.
[in] | acl_user | The ACL_USER for whom to remove the Restrictions |
size_t Acl_restrictions::size | ( | ) | const |
void Acl_restrictions::upsert_restrictions | ( | const ACL_USER * | acl_user, |
const Restrictions & | restrictions | ||
) |
Update, insert or remove the Restrictions for the ACL_USER.
If ACL_USER has a Restrictions
[in] | acl_user | The ACL_USER for whom to alter the Restrictions |
[in] | restrictions | Restrictions to be inserted for the ACL_USER |
|
private |