A RAII to used to allow updates in the DD tables mysql.index_stats and mysql.index_stats.
More...
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.