![]() |
MySQL 8.4.4
Source Code Documentation
|
Enables preserving temporary account locking attributes during ACL DDL. More...
#include <sql_auth_cache.h>
Public Member Functions | |
ACL_temporary_lock_state (const char *host, const char *user, uint remaining_login_attempts, long daynr_locked) | |
Static Public Member Functions | |
static bool | is_modified (ACL_USER *acl_user) |
static ACL_USER * | preserve_user_lock_state (const char *host, const char *user, Lock_state_list &user_list) |
Enables preserving temporary account locking attributes of a user during ACL DDL. More... | |
static void | restore_user_lock_state (const char *host, const char *user, uint remaining_login_attempts, long daynr_locked) |
Enables restoring temporary account locking attributes of a user after ACL reload. More... | |
static void | restore_temporary_account_locking (Prealloced_array< ACL_USER, ACL_PREALLOC_SIZE > *old_acl_users, Lock_state_list *modified_user_lock_state_list) |
Enables restoring temporary account locking attributes of all users after ACL reload. More... | |
Private Attributes | |
const char * | m_host |
const char * | m_user |
const uint | m_remaining_login_attempts |
const long | m_daynr_locked |
Enables preserving temporary account locking attributes during ACL DDL.
Enables restoring temporary account locking attributes after ACL reload.
This class is used to preserve the state of the accounts being altered by the current ACL statement. The account locking data needs to be preserved since the current state of account locking is not stored into the table and can't be restored from it when the code needs to re-create the ACL caches from the tables.
When an ACL DDL statement that can modify account locking data starts, a new instance of this class is created and the current in-memory account locking data is preserved for each user that is modified by the statement, if account locking data is not default.
ACL DDL rollback results in the in-memory ACL cache being re-created during ACL reload.
After ACL reload:
ACL_temporary_lock_state::ACL_temporary_lock_state | ( | const char * | host, |
const char * | user, | ||
uint | remaining_login_attempts, | ||
long | daynr_locked | ||
) |
|
static |
|
static |
Enables preserving temporary account locking attributes of a user during ACL DDL.
[in] | host | Account's hostname. |
[in] | user | Account's username. |
[out] | user_list | List in which a user's lock state is preserved. |
|
static |
Enables restoring temporary account locking attributes of all users after ACL reload.
[in] | old_acl_users | List of users in the old ACL cache. |
[in] | modified_user_lock_state_list | List of users whose temporary account locking attributes are likely modified. |
|
static |
Enables restoring temporary account locking attributes of a user after ACL reload.
[in] | host | Account's hostname. |
[in] | user | Account's username. |
[in] | remaining_login_attempts | Account's remaining login attempts. |
[in] | daynr_locked | Account's locked day. |
|
private |
|
private |
|
private |
|
private |