MySQL 8.4.3
Source Code Documentation
Grant_temporary_dynamic_privileges Class Reference

Grant the privilege temporarily to the in-memory global privileges map. More...

#include <auth_common.h>

Inheritance diagram for Grant_temporary_dynamic_privileges:
[legend]

Public Member Functions

 Grant_temporary_dynamic_privileges (const THD *thd, std::vector< std::string > privs)
 
bool precheck (Security_context *sctx)
 
bool grant_privileges (Security_context *sctx)
 Grant dynamic privileges to an in-memory global authid. More...
 
- Public Member Functions inherited from Grant_privileges< Grant_temporary_dynamic_privileges >
bool operator() (Security_context *sctx, Operation op) override
 
- Public Member Functions inherited from Security_context_policy
 Security_context_policy ()=default
 
virtual ~Security_context_policy ()=default
 
 Security_context_policy (const Security_context_policy &)=default
 

Private Attributes

const THDm_thd
 
const std::vector< std::string > m_privs
 

Additional Inherited Members

- Public Types inherited from Security_context_policy
enum  Operation { Precheck , Execute }
 

Detailed Description

Grant the privilege temporarily to the in-memory global privileges map.

This class is not thread safe.

Constructor & Destructor Documentation

◆ Grant_temporary_dynamic_privileges()

Grant_temporary_dynamic_privileges::Grant_temporary_dynamic_privileges ( const THD thd,
std::vector< std::string >  privs 
)

Member Function Documentation

◆ grant_privileges()

bool Grant_temporary_dynamic_privileges::grant_privileges ( Security_context sctx)

Grant dynamic privileges to an in-memory global authid.

Parameters
sctxThe authid to grant privileges to.
Returns
Success status
Return values
truean error occurred
falsesuccess

◆ precheck()

bool Grant_temporary_dynamic_privileges::precheck ( Security_context sctx)

Member Data Documentation

◆ m_privs

const std::vector<std::string> Grant_temporary_dynamic_privileges::m_privs
private

◆ m_thd

const THD* Grant_temporary_dynamic_privileges::m_thd
private

The documentation for this class was generated from the following files: