MySQL 8.3.0
Source Code Documentation
anonymous_namespace{table_stats.cc}::Update_I_S_statistics_ctx Class Reference

A RAII to used to allow updates in the DD tables mysql.index_stats and mysql.index_stats. More...

Public Member Functions

 Update_I_S_statistics_ctx (THD *thd)
 
 ~Update_I_S_statistics_ctx ()
 

Private Attributes

THDm_thd
 

Detailed Description

A RAII to used to allow updates in the DD tables mysql.index_stats and mysql.index_stats.

These tables are marked as system tables and cannot be updated directly by the user. Also, we always use non-locking reads to read DD tables in I_S queries. Active transaction in this thread or other connections can only do non-locking reads on the these dictionary tables. Hence, deadlocks are not possible when doing updates to index_stats/table_stats. So it is safe to use attachable read-write transaction for this purpose.

Constructor & Destructor Documentation

◆ Update_I_S_statistics_ctx()

anonymous_namespace{table_stats.cc}::Update_I_S_statistics_ctx::Update_I_S_statistics_ctx ( THD thd)
inline

◆ ~Update_I_S_statistics_ctx()

anonymous_namespace{table_stats.cc}::Update_I_S_statistics_ctx::~Update_I_S_statistics_ctx ( )
inline

Member Data Documentation

◆ m_thd

THD* anonymous_namespace{table_stats.cc}::Update_I_S_statistics_ctx::m_thd
private

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