MySQL 8.0.39
Source Code Documentation
btrsea_sync_check Struct Reference

Functor to check whether the calling thread owns the btr search mutex. More...

#include <sync0types.h>

Inheritance diagram for btrsea_sync_check:
[legend]

Public Member Functions

 btrsea_sync_check (bool has_search_latch)
 Constructor. More...
 
 ~btrsea_sync_check () override=default
 Destructor. More...
 
bool operator() (const latch_level_t level) override
 Called for every latch owned by the calling thread. More...
 
bool result () const override
 
- Public Member Functions inherited from sync_check_functor_t
virtual ~sync_check_functor_t ()=default
 

Private Attributes

bool m_result
 True if all OK. More...
 
const bool m_has_search_latch
 If the caller owns the search latch. More...
 

Detailed Description

Functor to check whether the calling thread owns the btr search mutex.

Constructor & Destructor Documentation

◆ btrsea_sync_check()

btrsea_sync_check::btrsea_sync_check ( bool  has_search_latch)
inlineexplicit

Constructor.

Parameters
[in]has_search_latchtrue if owns the latch

◆ ~btrsea_sync_check()

btrsea_sync_check::~btrsea_sync_check ( )
overridedefault

Destructor.

Member Function Documentation

◆ operator()()

bool btrsea_sync_check::operator() ( const latch_level_t  level)
inlineoverridevirtual

Called for every latch owned by the calling thread.

Parameters
[in]levelLevel of the existing latch
Returns
true if the predicate check fails

Implements sync_check_functor_t.

◆ result()

bool btrsea_sync_check::result ( ) const
inlineoverridevirtual
Returns
result from the check

Implements sync_check_functor_t.

Member Data Documentation

◆ m_has_search_latch

const bool btrsea_sync_check::m_has_search_latch
private

If the caller owns the search latch.

◆ m_result

bool btrsea_sync_check::m_result
private

True if all OK.


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