MySQL 9.1.0
Source Code Documentation
|
#include "sql_backup_lock.h"
#include <utility>
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysqld_error.h"
#include "sql/auth/sql_security_ctx.h"
#include "sql/mdl.h"
#include "sql/system_variables.h"
#include "sql_class.h"
#include "string_with_len.h"
Classes | |
class | Release_all_backup_locks |
MDL_release_locks_visitor subclass to release MDL for BACKUP_LOCK. More... | |
Functions | |
static bool | check_backup_admin_privilege (THD *thd) |
Check if a current user has the privilege BACKUP_ADMIN required to run the statement LOCK INSTANCE FOR BACKUP. More... | |
static bool | acquire_mdl_for_backup (THD *thd, enum_mdl_type mdl_type, enum_mdl_duration mdl_duration, ulong lock_wait_timeout) |
Acquire either exclusive or shared Backup Lock. More... | |
void | release_backup_lock (THD *thd) |
Release Backup Lock if it was acquired. More... | |
bool | acquire_exclusive_backup_lock (THD *thd, ulong lock_wait_timeout, bool for_trx) |
bool | acquire_shared_backup_lock (THD *thd, ulong lock_wait_timeout, bool for_trx) |
bool acquire_exclusive_backup_lock | ( | THD * | thd, |
ulong | lock_wait_timeout, | ||
bool | for_trx | ||
) |
|
static |
Acquire either exclusive or shared Backup Lock.
[in] | thd | Current thread context |
[in] | mdl_type | Type of metadata lock to acquire for backup |
[in] | mdl_duration | Duration of metadata lock |
[in] | lock_wait_timeout | How many seconds to wait before timeout. |
false | Success |
true | Failure |
bool acquire_shared_backup_lock | ( | THD * | thd, |
ulong | lock_wait_timeout, | ||
bool | for_trx | ||
) |
|
static |
Check if a current user has the privilege BACKUP_ADMIN required to run the statement LOCK INSTANCE FOR BACKUP.
thd | Current thread |
false | A user has the privilege BACKUP_ADMIN |
true | A user doesn't have the privilege BACKUP_ADMIN |
void release_backup_lock | ( | THD * | thd | ) |
Release Backup Lock if it was acquired.
[in] | thd | Current thread context |