MySQL 8.0.40
Source Code Documentation
Trx_by_id_with_min Class Reference

#include <trx0sys.h>

Classes

struct  Trx_track_hash
 

Public Member Functions

By_id const & by_id () const
 
trx_id_t min_id () const
 
trx_tget (trx_id_t trx_id) const
 
void insert (trx_t &trx)
 
void erase (trx_id_t trx_id)
 

Private Types

using By_id = std::unordered_map< trx_id_t, trx_t *, Trx_track_hash >
 

Private Attributes

By_id m_by_id
 
std::atomic< trx_id_tm_min_id {0}
 For observers which use Trx_shard::mutex protection: each transaction id in the m_by_id is guaranteed to be at least m_min_id. More...
 

Member Typedef Documentation

◆ By_id

using Trx_by_id_with_min::By_id = std::unordered_map<trx_id_t, trx_t *, Trx_track_hash>
private

Member Function Documentation

◆ by_id()

By_id const & Trx_by_id_with_min::by_id ( ) const
inline

◆ erase()

void Trx_by_id_with_min::erase ( trx_id_t  trx_id)
inline

◆ get()

trx_t * Trx_by_id_with_min::get ( trx_id_t  trx_id) const
inline

◆ insert()

void Trx_by_id_with_min::insert ( trx_t trx)
inline

◆ min_id()

trx_id_t Trx_by_id_with_min::min_id ( ) const
inline

Member Data Documentation

◆ m_by_id

By_id Trx_by_id_with_min::m_by_id
private

◆ m_min_id

std::atomic<trx_id_t> Trx_by_id_with_min::m_min_id {0}
private

For observers which use Trx_shard::mutex protection: each transaction id in the m_by_id is guaranteed to be at least m_min_id.

Writes are protected with Trx_shard::mutex. Reads can be performed without any latch before accessing m_by_id, but care must be taken to interpret the result -

See also
trx_rw_is_active for details.

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