MySQL 8.4.2
Source Code Documentation
|
Class to handle sanity checks for GRANT ... AS ... statement. More...
Public Member Functions | |
Grant_validator (THD *thd, const char *db, const List< LEX_USER > &user_list, Access_bitmask rights, bool revoke, const List< LEX_CSTRING > &dynamic_privilege, bool grant_all, LEX_GRANT_AS *grant_as, TABLE *dynamic_priv_table) | |
~Grant_validator () | |
bool | validate () |
Umbrella method to perform validation. More... | |
Private Member Functions | |
bool | mask_and_return_error () |
Helper function to mask specific error with generic one. More... | |
bool | validate_system_user_privileges () |
Validate that if grantee has SYSTEM_USER privileges, current user has it too. More... | |
bool | validate_dynamic_privileges () |
Permission and sanity checks for dynamic privileges. More... | |
bool | validate_and_process_grant_as () |
Perform sanity checks for GRANT ... AS ... More... | |
Private Attributes | |
THD * | m_thd |
const char * | m_db |
const List< LEX_USER > & | m_user_list |
Access_bitmask | m_rights |
bool | m_revoke |
const List< LEX_CSTRING > & | m_dynamic_privilege |
bool | m_grant_all |
LEX_GRANT_AS * | m_grant_as |
TABLE * | m_dynamic_priv_table |
bool | m_restore |
Security_context * | m_backup |
Security_context | m_security_context |
Class to handle sanity checks for GRANT ... AS ... statement.
|
inlineexplicit |
Grant_validator::~Grant_validator | ( | ) |
|
private |
Helper function to mask specific error with generic one.
bool Grant_validator::validate | ( | ) |
Umbrella method to perform validation.
A possible side effect of this method is that active security context of the session may have been changed. This is true if GRANT ... AS ... is used.
false | Success |
true | Error found during validation |
|
private |
Perform sanity checks for GRANT ... AS ...
false | Success. Security context may have been changed |
true | Failure. Error has been raised. |
|
private |
Permission and sanity checks for dynamic privileges.
We check:
false | Success |
true | Error validating dynamic privileges |
|
private |
Validate that if grantee has SYSTEM_USER privileges, current user has it too.
false | Success |
true | Current user lacks SYSTEM_USER privilege |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |