MySQL 8.0.40
Source Code Documentation
Innodb_data_lock_iterator Class Reference

Inspect data locks for the innodb storage engine. More...

Inheritance diagram for Innodb_data_lock_iterator:
[legend]

Public Member Functions

bool scan (PSI_server_data_lock_container *container, bool with_lock_data) override
 Scan for more data locks. More...
 
void fetch (PSI_server_data_lock_container *container, const char *engine_lock_id, size_t engine_lock_id_length, bool with_lock_data) override
 Fetch a given data lock. More...
 
- Public Member Functions inherited from PSI_engine_data_lock_iterator
 PSI_engine_data_lock_iterator ()=default
 
virtual ~PSI_engine_data_lock_iterator ()=default
 

Static Private Member Functions

static size_t report (std::unordered_map< const char *, parsed_table_path > &parsed_paths, PSI_server_data_lock_container &container, const lock_t &lock, bool with_lock_data, bool with_filter, ulint filter_heap_no=ULINT_UNDEFINED)
 For a given lock it will inform container about each lock request it represents (which can be more than one in case of LOCK_RECORD as there can be multiple lock requests differing only by heap_no compressed into single lock object), subject to filtering defined for the container, and optionally by filter_heap_no if with_filter is true. More...
 

Private Attributes

All_locks_iterator m_all_locks_iterator
 

Detailed Description

Inspect data locks for the innodb storage engine.

Member Function Documentation

◆ fetch()

void Innodb_data_lock_iterator::fetch ( PSI_server_data_lock_container container,
const char *  engine_lock_id,
size_t  engine_lock_id_length,
bool  with_lock_data 
)
overridevirtual

Fetch a given data lock.

Parameters
containerThe container to fill
engine_lock_idThe lock id to search
engine_lock_id_lengthLock id length
with_lock_dataTrue if column LOCK_DATA is required.

Implements PSI_engine_data_lock_iterator.

◆ report()

size_t Innodb_data_lock_iterator::report ( std::unordered_map< const char *, parsed_table_path > &  parsed_paths,
PSI_server_data_lock_container container,
const lock_t lock,
bool  with_lock_data,
bool  with_filter,
ulint  filter_heap_no = ULINT_UNDEFINED 
)
staticprivate

For a given lock it will inform container about each lock request it represents (which can be more than one in case of LOCK_RECORD as there can be multiple lock requests differing only by heap_no compressed into single lock object), subject to filtering defined for the container, and optionally by filter_heap_no if with_filter is true.

The with_filter is used to fetch just a lock request, the one specified by its heap_no. Please note, that there is no guarantee that the lock with this heap no is still in the lock sys.

Parameters
[in,out]parsed_pathsThe cache of table path parsing results
[in,out]containerThe container to fill. Serves as both visitor and filter
[in]lockThe lock to inspect and report upon
[in]with_lock_dataTrue if column LOCK_DATA is required.
[in]with_filterIf true then filter_heap_no has to be passed, and means that only the lock request for that heap number (if still present and matches the container's filters) should be reported to the container. If false then all lock requests represented for this lock are considered for reporting.
[in]filter_heap_noif with_filter is true it further narrows the set of reported lock requests to just the one with given immutable id.
Returns
number of locks reported to the container

◆ scan()

bool Innodb_data_lock_iterator::scan ( PSI_server_data_lock_container container,
bool  with_lock_data 
)
overridevirtual

Scan for more data locks.

Parameters
containerThe container to fill
with_lock_dataTrue if column LOCK_DATA is required.
Returns
true if the iterator is done

Implements PSI_engine_data_lock_iterator.

Member Data Documentation

◆ m_all_locks_iterator

All_locks_iterator Innodb_data_lock_iterator::m_all_locks_iterator
private

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