MySQL 8.0.39
Source Code Documentation
sql_backup_lock.h File Reference
#include <sys/types.h>
#include "my_sqlcommand.h"
#include "sql/sql_cmd.h"

Go to the source code of this file.

Classes

class  Sql_cmd_lock_instance
 Sql_cmd_lock_instance represents statement LOCK INSTANCE FOR BACKUP. More...
 
class  Sql_cmd_unlock_instance
 Sql_cmd_unlock_instance represents statement UNLOCK INSTANCE. More...
 
class  Shared_backup_lock_guard
 MDL_key::BACKUP_LOCK RAII. More...
 

Functions

bool acquire_exclusive_backup_lock (THD *thd, unsigned long lock_wait_timeout, bool for_trx)
 Acquire exclusive Backup Lock. More...
 
bool acquire_shared_backup_lock (THD *thd, unsigned long lock_wait_timeout, bool for_trx=true)
 Acquire shared Backup Lock. More...
 
void release_backup_lock (THD *thd)
 Release Backup Lock if it was acquired. More...
 

Function Documentation

◆ acquire_exclusive_backup_lock()

bool acquire_exclusive_backup_lock ( THD thd,
unsigned long  lock_wait_timeout,
bool  for_trx 
)

Acquire exclusive Backup Lock.

Parameters
[in]thdCurrent thread context
[in]lock_wait_timeoutHow many seconds to wait before timeout.
[in]for_trxtrue if MDL duration is MDL_TRANSACTION false if MDL duration is MDL_EXPLICIT
Returns
Operation status.
Return values
falseSuccess
trueFailure

◆ acquire_shared_backup_lock()

bool acquire_shared_backup_lock ( THD thd,
unsigned long  lock_wait_timeout,
bool  for_trx = true 
)

Acquire shared Backup Lock.

Parameters
[in]thdCurrent thread context
[in]lock_wait_timeoutHow many seconds to wait before timeout.
[in]for_trxtrue if MDL duration is MDL_TRANSACTION false if MDL duration is MDL_EXPLICIT
Returns
Operation status.
Return values
falseSuccess
trueFailure

◆ release_backup_lock()

void release_backup_lock ( THD thd)

Release Backup Lock if it was acquired.

Parameters
[in]thdCurrent thread context