23#ifndef SQL_LOCK_INCLUDED
24#define SQL_LOCK_INCLUDED
114 THD *thd,
bool for_trx);
149 bool for_trx =
true);
MDL_key::BACKUP_LOCK RAII.
Definition: sql_backup_lock.h:78
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:104
THD * m_thd
Definition: sql_backup_lock.h:116
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:115
Shared_backup_lock_guard(THD *thd)
Definition: sql_backup_lock.cc:80
~Shared_backup_lock_guard()
Definition: sql_backup_lock.cc:92
Lock_result
There are three possible results while checking if the instance is locked for backup.
Definition: sql_backup_lock.h:84
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:37
bool execute(THD *thd) override
Execute LOCK INSTANCE statement once.
Definition: sql_backup_lock.cc:58
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_backup_lock.h:49
Sql_cmd_unlock_instance represents statement UNLOCK INSTANCE.
Definition: sql_backup_lock.h:58
bool execute(THD *thd) override
Execute UNLOCK INSTANCE statement once.
Definition: sql_backup_lock.cc:71
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_backup_lock.h:70
Representation of an SQL command.
Definition: sql_cmd.h:81
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
enum_sql_command
Definition: my_sqlcommand.h:45
@ SQLCOM_LOCK_INSTANCE
Definition: my_sqlcommand.h:200
@ SQLCOM_UNLOCK_INSTANCE
Definition: my_sqlcommand.h:201
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:158
Representation of an SQL command.