MySQL 8.4.2
Source Code Documentation
Find_thd_query_lock Class Reference

Callback function used by Sql_cmd_explain_other_thread::execute() to find thd based on the thread id. More...

Inheritance diagram for Find_thd_query_lock:
[legend]

Public Member Functions

 Find_thd_query_lock (my_thread_id value)
 
 ~Find_thd_query_lock () override
 
bool operator() (THD *thd) override
 Override this operator to provide implementation to find specific thd. More...
 
- Public Member Functions inherited from Find_THD_Impl
virtual ~Find_THD_Impl ()=default
 

Private Attributes

const my_thread_id m_id
 The thread id we are looking for. More...
 
THDm_thd
 THD we found, having this ID. More...
 

Detailed Description

Callback function used by Sql_cmd_explain_other_thread::execute() to find thd based on the thread id.

Note
It acquires LOCK_thd_data mutex and LOCK_query_plan mutex, when it finds matching thd. It is the responsibility of the caller to release LOCK_thd_data. We release LOCK_query_plan in the DTOR.

Constructor & Destructor Documentation

◆ Find_thd_query_lock()

Find_thd_query_lock::Find_thd_query_lock ( my_thread_id  value)
inlineexplicit

◆ ~Find_thd_query_lock()

Find_thd_query_lock::~Find_thd_query_lock ( )
inlineoverride

Member Function Documentation

◆ operator()()

bool Find_thd_query_lock::operator() ( THD thd)
inlineoverridevirtual

Override this operator to provide implementation to find specific thd.

Parameters
thdTHD of one element in global thread list
Returns
bool
Return values
truefor matching thd false otherwise

Implements Find_THD_Impl.

Member Data Documentation

◆ m_id

const my_thread_id Find_thd_query_lock::m_id
private

The thread id we are looking for.

◆ m_thd

THD* Find_thd_query_lock::m_thd
private

THD we found, having this ID.


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