MySQL 8.4.2
Source Code Documentation
Lock_iter Struct Reference

Iterate over record locks matching <space, page_no, heap_no> More...

#include <lock0priv.h>

Static Public Member Functions

static lock_tadvance (const RecID &rec_id, lock_t *lock)
 Gets the next record lock on a page. More...
 
static lock_tfirst (hash_cell_t *list, const RecID &rec_id)
 Gets the first explicit lock request on a record. More...
 
template<typename F >
static const lock_tfor_each (const RecID &rec_id, F &&f, hash_table_t *hash_table=lock_sys->rec_hash)
 Iterate over all the locks on a specific row. More...
 

Detailed Description

Iterate over record locks matching <space, page_no, heap_no>

Member Function Documentation

◆ advance()

static lock_t * Lock_iter::advance ( const RecID rec_id,
lock_t lock 
)
inlinestatic

Gets the next record lock on a page.

Parameters
[in]rec_idThe record ID
[in]lockThe current lock
Returns
matching lock or nullptr if end of list

◆ first()

static lock_t * Lock_iter::first ( hash_cell_t list,
const RecID rec_id 
)
inlinestatic

Gets the first explicit lock request on a record.

Parameters
[in]listRecord hash
[in]rec_idRecord ID
Returns
first lock, nullptr if none exists

◆ for_each()

template<typename F >
static const lock_t * Lock_iter::for_each ( const RecID rec_id,
F &&  f,
hash_table_t hash_table = lock_sys->rec_hash 
)
inlinestatic

Iterate over all the locks on a specific row.

Parameters
[in]rec_idIterate over locks on this row
[in]fFunction to call for each entry
[in]hash_tableThe hash table to iterate over
Returns
lock where the callback returned false

The documentation for this struct was generated from the following file: