MySQL  8.0.27
Source Code Documentation
MDL_lock_is_owned_visitor Class Reference

Inspect if MDL_context is owned by any thread. More...

#include <mdl.h>

Inheritance diagram for MDL_lock_is_owned_visitor:
MDL_context_visitor

Public Member Functions

 MDL_lock_is_owned_visitor ()
 
void visit_context (const MDL_context *ctx[[maybe_unused]]) override
 Collects relevant information about the MDL lock owner. More...
 
bool exists () const
 Returns if an owner for the MDL lock being inspected exists. More...
 
- Public Member Functions inherited from MDL_context_visitor
virtual ~MDL_context_visitor ()=default
 
virtual void visit_context (const MDL_context *ctx)=0
 

Private Attributes

bool m_exists
 

Detailed Description

Inspect if MDL_context is owned by any thread.

Constructor & Destructor Documentation

◆ MDL_lock_is_owned_visitor()

MDL_lock_is_owned_visitor::MDL_lock_is_owned_visitor ( )
inline

Member Function Documentation

◆ exists()

bool MDL_lock_is_owned_visitor::exists ( ) const
inline

Returns if an owner for the MDL lock being inspected exists.

Returns
true when MDL lock is owned, false otherwise.

◆ visit_context()

void MDL_lock_is_owned_visitor::visit_context ( const MDL_context *ctx]  [[maybe_unused])
inlineoverride

Collects relevant information about the MDL lock owner.

This function is only called by MDL_context::find_lock_owner() when searching for MDL lock owners to collect extra information about the owner. As we only need to know that the MDL lock is owned, setting m_exists to true is enough.

Member Data Documentation

◆ m_exists

bool MDL_lock_is_owned_visitor::m_exists
private

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