24#ifndef SQL_LOCK_INCLUDED
25#define SQL_LOCK_INCLUDED
115 THD *thd,
bool for_trx);
150 bool for_trx =
true);
MDL_key::BACKUP_LOCK RAII.
Definition: sql_backup_lock.h:79
Shared_backup_lock_guard::Lock_result try_acquire_shared_backup_lock(THD *thd, bool for_trx)
Try to acquire shared backup lock.
Definition: sql_backup_lock.cc:105
THD * m_thd
Definition: sql_backup_lock.h:117
Shared_backup_lock_guard & operator=(Shared_backup_lock_guard &&o)=default
Shared_backup_lock_guard(const Shared_backup_lock_guard &o)=delete
Shared_backup_lock_guard::Lock_result m_lock_state
Definition: sql_backup_lock.h:116
Shared_backup_lock_guard(THD *thd)
Definition: sql_backup_lock.cc:81
~Shared_backup_lock_guard()
Definition: sql_backup_lock.cc:93
Lock_result
There are three possible results while checking if the instance is locked for backup.
Definition: sql_backup_lock.h:85
Shared_backup_lock_guard & operator=(const Shared_backup_lock_guard &o)=delete
Shared_backup_lock_guard(Shared_backup_lock_guard &&o)=default
Sql_cmd_lock_instance represents statement LOCK INSTANCE FOR BACKUP.
Definition: sql_backup_lock.h:38
bool execute(THD *thd) override
Execute LOCK INSTANCE statement once.
Definition: sql_backup_lock.cc:59
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_backup_lock.h:50
Sql_cmd_unlock_instance represents statement UNLOCK INSTANCE.
Definition: sql_backup_lock.h:59
bool execute(THD *thd) override
Execute UNLOCK INSTANCE statement once.
Definition: sql_backup_lock.cc:72
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_backup_lock.h:71
Representation of an SQL command.
Definition: sql_cmd.h:65
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_LOCK_INSTANCE
Definition: my_sqlcommand.h:201
@ SQLCOM_UNLOCK_INSTANCE
Definition: my_sqlcommand.h:202
bool acquire_shared_backup_lock(THD *thd, unsigned long lock_wait_timeout, bool for_trx=true)
Acquire shared Backup Lock.
bool acquire_exclusive_backup_lock(THD *thd, unsigned long lock_wait_timeout, bool for_trx)
Acquire exclusive Backup Lock.
void release_backup_lock(THD *thd)
Release Backup Lock if it was acquired.
Definition: sql_backup_lock.cc:159
Representation of an SQL command.