MySQL 9.0.0
Source Code Documentation
srv_slot_t Struct Reference

Thread slot in the thread table. More...

#include <srv0srv.h>

Public Attributes

srv_thread_type type
 Thread type: user, utility etc. More...
 
bool in_use
 true if this slot is in use. More...
 
bool suspended
 true if the thread is waiting for the event of this slot. More...
 
std::chrono::steady_clock::time_point suspend_time
 Time when the thread was suspended. More...
 
uint64_t reservation_no
 Stores the current value of lock_wait_table_reservations, when lock_wait_table_reserve_slot is called. More...
 
std::chrono::steady_clock::duration wait_timeout
 Wait time that if exceeded the thread will be timed out. More...
 
os_event_t event
 Event used in suspending the thread when it has nothing to do. More...
 
que_thr_tthr
 Suspended query thread (only used for user threads). More...
 

Detailed Description

Thread slot in the thread table.


Member Data Documentation

◆ event

os_event_t srv_slot_t::event

Event used in suspending the thread when it has nothing to do.

◆ in_use

bool srv_slot_t::in_use

true if this slot is in use.

◆ reservation_no

uint64_t srv_slot_t::reservation_no

Stores the current value of lock_wait_table_reservations, when lock_wait_table_reserve_slot is called.

This can be used as a version number to avoid ABA problems. The difference lock_wait_table_reservations - reservation_no tells us how many other threads got suspended while our thr was sleeping. This can be used to determine if the wait was unfairly long, and it is time to boost trx->lock.schedule_weight. Protected by lock->wait_mutex.

◆ suspend_time

std::chrono::steady_clock::time_point srv_slot_t::suspend_time

Time when the thread was suspended.

Initialized by lock_wait_table_reserve_slot() for lock wait.

◆ suspended

bool srv_slot_t::suspended

true if the thread is waiting for the event of this slot.

◆ thr

que_thr_t* srv_slot_t::thr

Suspended query thread (only used for user threads).

◆ type

srv_thread_type srv_slot_t::type

Thread type: user, utility etc.

◆ wait_timeout

std::chrono::steady_clock::duration srv_slot_t::wait_timeout

Wait time that if exceeded the thread will be timed out.

Initialized by lock_wait_table_reserve_slot() for lock wait.


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