MySQL  8.0.15
Source Code Documentation

An abstract PERFORMANCE_SCHEMA table. More...

#include <pfs_engine_table.h>

Inheritance diagram for PFS_engine_table:
cursor_by_account cursor_by_host cursor_by_thread cursor_by_thread_connect_attr cursor_by_user table_all_instr table_cond_instances table_data_lock_waits table_data_locks table_ees_by_account_by_error table_ees_by_host_by_error table_ees_by_thread_by_error table_ees_by_user_by_error table_ees_global_by_error table_esgs_by_account_by_event_name table_esgs_by_host_by_event_name table_esgs_by_thread_by_event_name table_esgs_by_user_by_event_name table_esgs_global_by_event_name table_esmh_by_digest table_esmh_global table_esms_by_account_by_event_name table_esms_by_digest table_esms_by_host_by_event_name table_esms_by_program table_esms_by_thread_by_event_name table_esms_by_user_by_event_name table_esms_global_by_event_name table_ets_by_account_by_event_name table_ets_by_host_by_event_name table_ets_by_thread_by_event_name table_ets_by_user_by_event_name table_ets_global_by_event_name table_events_stages_common table_events_statements_common table_events_transactions_common table_events_waits_common table_ews_by_account_by_event_name table_ews_by_host_by_event_name table_ews_by_thread_by_event_name table_ews_by_user_by_event_name table_ews_global_by_event_name table_file_instances table_file_summary_by_event_name table_file_summary_by_instance table_global_status table_global_variables table_host_cache table_log_status table_mems_by_account_by_event_name table_mems_by_host_by_event_name table_mems_by_thread_by_event_name table_mems_by_user_by_event_name table_mems_global_by_event_name table_metadata_locks table_mutex_instances table_os_global_by_type table_performance_timers table_persisted_variables table_plugin_table table_prepared_stmt_instances table_replication_applier_configuration table_replication_applier_filters table_replication_applier_global_filters table_replication_applier_status table_replication_applier_status_by_coordinator table_replication_applier_status_by_worker table_replication_connection_configuration table_replication_connection_status table_replication_group_member_stats table_replication_group_members table_rwlock_instances table_session_status table_session_variables table_setup_actors table_setup_consumers table_setup_instruments table_setup_objects table_setup_threads table_socket_instances table_socket_summary_by_event_name table_socket_summary_by_instance table_status_by_account table_status_by_host table_status_by_thread table_status_by_user table_table_handles table_tiws_by_index_usage table_tiws_by_table table_tlws_by_table table_user_defined_functions table_uvar_by_thread table_variables_by_thread table_variables_info

Public Member Functions

int read_row (TABLE *table, unsigned char *buf, Field **fields)
 Read a table row. More...
 
int update_row (TABLE *table, const unsigned char *old_buf, unsigned char *new_buf, Field **fields)
 Update a table row. More...
 
int delete_row (TABLE *table, const unsigned char *buf, Field **fields)
 Delete a row from this table. More...
 
virtual int rnd_init (bool scan)
 Initialize table scan. More...
 
virtual int rnd_next (void)=0
 Fetch the next row in this cursor. More...
 
virtual int index_init (uint idx, bool sorted)
 
virtual int index_read (KEY *key_infos, uint index, const uchar *key, uint key_len, enum ha_rkey_function find_flag)
 Positions an index cursor to the index specified in the handle. More...
 
virtual int index_read_last (KEY *key_infos, const uchar *key, uint key_len)
 
virtual int index_next ()
 Find key in index, read record. More...
 
virtual int index_next_same (const uchar *key, uint key_len)
 Reads the next row matching the given key value. More...
 
virtual int index_prev ()
 
virtual int index_first ()
 
virtual int index_last ()
 
virtual int rnd_pos (const void *pos)=0
 Fetch a row by position. More...
 
void get_position (void *ref)
 Get the position of the current row. More...
 
void set_position (const void *ref)
 Set the table cursor at a given position. More...
 
virtual void reset_position (void)=0
 Reset the cursor position to the beginning of the table. More...
 
virtual ~PFS_engine_table ()
 Destructor. More...
 

Static Public Member Functions

static PFS_engine_table_sharefind_engine_table_share (const char *name)
 Find a table share by name. More...
 

Protected Member Functions

virtual int read_row_values (TABLE *table, unsigned char *buf, Field **fields, bool read_all)=0
 Read the current row values. More...
 
virtual int update_row_values (TABLE *table, const unsigned char *old_buf, unsigned char *new_buf, Field **fields)
 Update the current row values. More...
 
virtual int delete_row_values (TABLE *table, const unsigned char *buf, Field **fields)
 Delete a row. More...
 
 PFS_engine_table (const PFS_engine_table_share *share, void *pos)
 Constructor. More...
 

Protected Attributes

const PFS_engine_table_sharem_share_ptr
 Table share. More...
 
void * m_pos_ptr
 Opaque pointer to the m_pos position of this cursor. More...
 
time_normalizerm_normalizer
 Current normalizer. More...
 
PFS_engine_index_abstractm_index
 Current index. More...
 

Detailed Description

An abstract PERFORMANCE_SCHEMA table.

Every table implemented in the performance schema schema and storage engine derives from this class.

Constructor & Destructor Documentation

◆ ~PFS_engine_table()

virtual PFS_engine_table::~PFS_engine_table ( )
inlinevirtual

Destructor.

◆ PFS_engine_table()

PFS_engine_table::PFS_engine_table ( const PFS_engine_table_share share,
void *  pos 
)
inlineprotected

Constructor.

Parameters
sharetable share
posaddress of the m_pos position member

Member Function Documentation

◆ index_first()

virtual int PFS_engine_table::index_first ( )
inlinevirtual

◆ index_init()

virtual int PFS_engine_table::index_init ( uint  idx,
bool  sorted 
)
inlinevirtual

Reimplemented in table_cond_instances, table_events_statements_history, table_events_statements_current, table_replication_applier_status_by_worker, table_rwlock_instances, table_events_waits_history, table_events_transactions_history, table_threads, table_prepared_stmt_instances, table_replication_connection_status, table_events_stages_history, table_events_waits_current, table_events_transactions_current, table_replication_applier_status_by_coordinator, table_uvar_by_thread, table_replication_connection_configuration, table_socket_instances, table_host_cache, table_events_stages_current, table_metadata_locks, table_table_handles, table_esmh_by_digest, table_status_by_account, table_status_by_host, table_status_by_user, table_file_summary_by_instance, table_status_by_thread, table_variables_by_thread, table_ews_by_account_by_event_name, table_mutex_instances, table_ews_by_host_by_event_name, table_ews_by_thread_by_event_name, table_ews_by_user_by_event_name, table_replication_applier_status, table_esms_by_thread_by_event_name, table_ets_by_thread_by_event_name, table_ets_by_account_by_event_name, table_ets_by_host_by_event_name, table_ets_by_user_by_event_name, table_esms_by_account_by_event_name, table_ees_by_account_by_error, table_esgs_by_account_by_event_name, table_esgs_by_user_by_event_name, table_os_global_by_type, table_replication_applier_configuration, table_ees_by_thread_by_error, table_esgs_by_thread_by_event_name, table_socket_summary_by_instance, table_ees_by_host_by_error, table_ees_by_user_by_error, table_esgs_by_host_by_event_name, table_esms_by_host_by_event_name, table_esms_by_user_by_event_name, table_ews_global_by_event_name, table_mems_by_account_by_event_name, table_tiws_by_index_usage, table_mems_global_by_event_name, table_mems_by_host_by_event_name, table_mems_by_thread_by_event_name, table_mems_by_user_by_event_name, table_events_waits_summary_by_instance, table_file_instances, table_user_defined_functions, table_data_lock_waits, table_data_locks, table_esms_by_digest, table_setup_actors, table_setup_objects, table_ees_global_by_error, table_setup_instruments, table_session_status, table_esmh_global, table_esms_by_program, table_global_status, table_global_variables, table_persisted_variables, table_session_variables, table_session_connect, table_ets_global_by_event_name, table_tiws_by_table, table_tlws_by_table, table_all_instr, table_accounts, table_esgs_global_by_event_name, table_socket_summary_by_event_name, table_file_summary_by_event_name, table_hosts, table_setup_consumers, table_users, table_esms_global_by_event_name, table_setup_threads, cursor_by_thread_connect_attr, and table_plugin_table.

◆ index_last()

virtual int PFS_engine_table::index_last ( )
inlinevirtual

◆ index_next()

virtual int PFS_engine_table::index_next ( void  )
inlinevirtual

Find key in index, read record.

Reimplemented in table_cond_instances, table_events_statements_history, table_events_statements_current, table_replication_applier_status_by_worker, table_rwlock_instances, table_events_waits_history, table_events_transactions_history, table_prepared_stmt_instances, table_replication_connection_status, table_events_stages_history, table_events_waits_current, table_events_transactions_current, table_replication_applier_status_by_coordinator, table_uvar_by_thread, table_replication_connection_configuration, table_socket_instances, table_host_cache, table_events_stages_current, table_metadata_locks, table_table_handles, table_esmh_by_digest, table_status_by_account, table_status_by_host, table_status_by_user, table_file_summary_by_instance, table_status_by_thread, table_variables_by_thread, table_ews_by_account_by_event_name, table_mutex_instances, table_ews_by_host_by_event_name, table_ews_by_thread_by_event_name, table_ews_by_user_by_event_name, table_replication_applier_status, table_esms_by_thread_by_event_name, table_ets_by_thread_by_event_name, table_ets_by_account_by_event_name, table_ets_by_host_by_event_name, table_ets_by_user_by_event_name, table_esms_by_account_by_event_name, table_ees_by_account_by_error, table_esgs_by_account_by_event_name, table_esgs_by_user_by_event_name, table_os_global_by_type, table_replication_applier_configuration, table_ees_by_thread_by_error, table_esgs_by_thread_by_event_name, table_socket_summary_by_instance, table_ees_by_host_by_error, table_ees_by_user_by_error, table_esgs_by_host_by_event_name, table_esms_by_host_by_event_name, table_esms_by_user_by_event_name, table_ews_global_by_event_name, table_mems_by_account_by_event_name, table_tiws_by_index_usage, table_mems_global_by_event_name, table_mems_by_host_by_event_name, table_mems_by_thread_by_event_name, table_mems_by_user_by_event_name, table_file_instances, table_user_defined_functions, table_data_lock_waits, table_data_locks, table_esms_by_digest, table_setup_actors, table_setup_objects, table_ees_global_by_error, table_setup_instruments, table_session_status, table_esmh_global, table_esms_by_program, table_global_status, table_global_variables, table_persisted_variables, table_session_variables, table_session_connect, table_all_instr, table_ets_global_by_event_name, table_tiws_by_table, table_tlws_by_table, table_esgs_global_by_event_name, table_socket_summary_by_event_name, table_file_summary_by_event_name, table_setup_consumers, table_esms_global_by_event_name, table_setup_threads, cursor_by_thread_connect_attr, cursor_by_account, cursor_by_thread, table_plugin_table, cursor_by_host, and cursor_by_user.

◆ index_prev()

virtual int PFS_engine_table::index_prev ( )
inlinevirtual

◆ index_read_last()

virtual int PFS_engine_table::index_read_last ( KEY key_infos,
const uchar key,
uint  key_len 
)
inlinevirtual

◆ read_row_values()

virtual int PFS_engine_table::read_row_values ( TABLE table,
unsigned char *  buf,
Field **  fields,
bool  read_all 
)
protectedpure virtual

Read the current row values.

Parameters
tableTable handle
bufrow buffer
fieldsTable fields
read_alltrue if all columns are read.

Implemented in table_cond_instances, table_rwlock_instances, table_replication_applier_status_by_worker, table_events_statements_common, table_prepared_stmt_instances, table_threads, table_replication_connection_status, table_uvar_by_thread, table_socket_instances, table_host_cache, table_events_waits_common, table_replication_applier_status_by_coordinator, table_metadata_locks, table_table_handles, table_events_transactions_common, table_replication_connection_configuration, table_esmh_by_digest, table_status_by_account, table_status_by_host, table_status_by_user, table_file_summary_by_instance, table_status_by_thread, table_variables_by_thread, table_ews_by_account_by_event_name, table_mutex_instances, table_ews_by_host_by_event_name, table_ews_by_thread_by_event_name, table_ews_by_user_by_event_name, table_esms_by_thread_by_event_name, table_ets_by_thread_by_event_name, table_ets_by_account_by_event_name, table_ets_by_host_by_event_name, table_ets_by_user_by_event_name, table_events_waits_summary_by_instance, table_esms_by_account_by_event_name, table_ees_by_account_by_error, table_esgs_by_account_by_event_name, table_esgs_by_user_by_event_name, table_events_stages_common, table_os_global_by_type, table_ees_by_thread_by_error, table_esgs_by_thread_by_event_name, table_replication_applier_filters, table_socket_summary_by_instance, table_ees_by_host_by_error, table_ees_by_user_by_error, table_esgs_by_host_by_event_name, table_esms_by_host_by_event_name, table_esms_by_user_by_event_name, table_ews_global_by_event_name, table_mems_by_account_by_event_name, table_tiws_by_index_usage, table_mems_global_by_event_name, table_mems_by_host_by_event_name, table_mems_by_thread_by_event_name, table_mems_by_user_by_event_name, table_file_instances, table_replication_applier_global_filters, table_user_defined_functions, table_data_lock_waits, table_data_locks, table_esms_by_digest, table_setup_actors, table_setup_objects, table_replication_applier_status, table_replication_group_member_stats, table_ees_global_by_error, table_setup_instruments, table_session_status, table_esmh_global, table_esms_by_program, table_global_status, table_global_variables, table_persisted_variables, table_session_variables, table_replication_applier_configuration, table_replication_group_members, table_session_connect, table_ets_global_by_event_name, table_tiws_by_table, table_tlws_by_table, table_esgs_global_by_event_name, table_socket_summary_by_event_name, table_esms_global_by_event_name, table_variables_info, table_file_summary_by_event_name, table_setup_consumers, table_setup_threads, table_accounts, table_log_status, table_hosts, table_users, table_plugin_table, and table_performance_timers.

◆ reset_position()

virtual void PFS_engine_table::reset_position ( void  )
pure virtual

Reset the cursor position to the beginning of the table.

Implemented in table_events_statements_history_long, table_cond_instances, table_events_statements_history, table_events_waits_history_long, table_events_transactions_history_long, table_events_statements_current, table_replication_applier_status_by_worker, table_rwlock_instances, table_events_stages_history_long, table_events_waits_history, table_events_transactions_history, table_prepared_stmt_instances, table_events_waits_current, table_replication_connection_status, table_events_stages_history, table_events_transactions_current, table_replication_applier_status_by_coordinator, table_uvar_by_thread, table_replication_connection_configuration, table_socket_instances, table_host_cache, table_replication_applier_filters, table_events_stages_current, table_metadata_locks, table_replication_applier_global_filters, table_table_handles, table_esmh_by_digest, table_status_by_account, table_file_summary_by_instance, table_status_by_host, table_status_by_user, table_status_by_thread, table_variables_by_thread, table_ews_by_account_by_event_name, table_mutex_instances, table_ews_by_host_by_event_name, table_ews_by_thread_by_event_name, table_ews_by_user_by_event_name, table_replication_group_member_stats, table_replication_applier_status, table_esms_by_thread_by_event_name, table_ets_by_thread_by_event_name, table_ets_by_account_by_event_name, table_ets_by_host_by_event_name, table_ets_by_user_by_event_name, table_esms_by_account_by_event_name, table_os_global_by_type, table_replication_applier_configuration, table_replication_group_members, table_ees_by_account_by_error, table_esgs_by_account_by_event_name, table_esgs_by_user_by_event_name, table_socket_summary_by_instance, table_ees_by_thread_by_error, table_esgs_by_thread_by_event_name, table_ees_by_host_by_error, table_ees_by_user_by_error, table_esgs_by_host_by_event_name, table_esms_by_host_by_event_name, table_esms_by_user_by_event_name, table_ews_global_by_event_name, table_mems_by_account_by_event_name, table_mems_global_by_event_name, table_tiws_by_index_usage, table_mems_by_host_by_event_name, table_mems_by_thread_by_event_name, table_mems_by_user_by_event_name, table_file_instances, table_data_lock_waits, table_data_locks, table_user_defined_functions, table_esms_by_digest, table_setup_actors, table_setup_objects, table_setup_instruments, table_ees_global_by_error, table_esmh_global, table_esms_by_program, table_session_status, table_global_status, table_all_instr, table_global_variables, table_persisted_variables, table_session_variables, table_log_status, table_esms_global_by_event_name, table_variables_info, table_ets_global_by_event_name, table_tiws_by_table, table_tlws_by_table, table_socket_summary_by_event_name, table_esgs_global_by_event_name, table_file_summary_by_event_name, table_setup_consumers, table_setup_threads, table_performance_timers, cursor_by_thread_connect_attr, cursor_by_account, cursor_by_thread, table_plugin_table, cursor_by_host, and cursor_by_user.

◆ rnd_init()

◆ rnd_next()

virtual int PFS_engine_table::rnd_next ( void  )
pure virtual

Fetch the next row in this cursor.

Implemented in table_cond_instances, table_events_statements_history_long, table_events_statements_history, table_events_waits_history_long, table_events_transactions_history_long, table_events_statements_current, table_replication_applier_status_by_worker, table_rwlock_instances, table_events_waits_history, table_events_stages_history_long, table_events_transactions_history, table_prepared_stmt_instances, table_replication_connection_status, table_events_stages_history, table_events_waits_current, table_events_transactions_current, table_replication_applier_status_by_coordinator, table_uvar_by_thread, table_replication_connection_configuration, table_socket_instances, table_host_cache, table_events_stages_current, table_replication_applier_filters, table_metadata_locks, table_table_handles, table_esmh_by_digest, table_replication_applier_global_filters, table_status_by_account, table_status_by_host, table_status_by_user, table_file_summary_by_instance, table_status_by_thread, table_variables_by_thread, table_ews_by_account_by_event_name, table_mutex_instances, table_ews_by_host_by_event_name, table_ews_by_thread_by_event_name, table_ews_by_user_by_event_name, table_replication_applier_status, table_esms_by_thread_by_event_name, table_ets_by_thread_by_event_name, table_ets_by_account_by_event_name, table_replication_group_member_stats, table_ets_by_host_by_event_name, table_ets_by_user_by_event_name, table_esms_by_account_by_event_name, table_ees_by_account_by_error, table_esgs_by_account_by_event_name, table_esgs_by_user_by_event_name, table_os_global_by_type, table_replication_applier_configuration, table_ees_by_thread_by_error, table_esgs_by_thread_by_event_name, table_socket_summary_by_instance, table_ees_by_host_by_error, table_ees_by_user_by_error, table_esgs_by_host_by_event_name, table_esms_by_host_by_event_name, table_esms_by_user_by_event_name, table_ews_global_by_event_name, table_mems_by_account_by_event_name, table_tiws_by_index_usage, table_mems_global_by_event_name, table_replication_group_members, table_mems_by_host_by_event_name, table_mems_by_thread_by_event_name, table_mems_by_user_by_event_name, table_file_instances, table_user_defined_functions, table_esms_by_digest, table_setup_actors, table_setup_objects, table_data_lock_waits, table_data_locks, table_ees_global_by_error, table_setup_instruments, table_session_status, table_esmh_global, table_esms_by_program, table_global_status, table_global_variables, table_persisted_variables, table_session_variables, table_all_instr, table_log_status, table_ets_global_by_event_name, table_tiws_by_table, table_tlws_by_table, table_esms_global_by_event_name, table_variables_info, table_esgs_global_by_event_name, table_socket_summary_by_event_name, table_file_summary_by_event_name, table_setup_consumers, table_setup_threads, cursor_by_thread_connect_attr, table_performance_timers, cursor_by_account, cursor_by_thread, table_plugin_table, cursor_by_host, and cursor_by_user.

◆ rnd_pos()

virtual int PFS_engine_table::rnd_pos ( const void *  pos)
pure virtual

Fetch a row by position.

Parameters
posposition to fetch

Implemented in table_cond_instances, table_events_statements_history_long, table_events_statements_history, table_events_waits_history_long, table_events_transactions_history_long, table_events_statements_current, table_replication_applier_status_by_worker, table_rwlock_instances, table_events_waits_history, table_events_stages_history_long, table_events_transactions_history, table_prepared_stmt_instances, table_replication_connection_status, table_events_stages_history, table_events_waits_current, table_events_transactions_current, table_replication_applier_status_by_coordinator, table_uvar_by_thread, table_replication_connection_configuration, table_socket_instances, table_host_cache, table_replication_applier_filters, table_events_stages_current, table_metadata_locks, table_table_handles, table_replication_applier_global_filters, table_esmh_by_digest, table_status_by_account, table_status_by_host, table_status_by_user, table_file_summary_by_instance, table_status_by_thread, table_variables_by_thread, table_ews_by_account_by_event_name, table_mutex_instances, table_ews_by_host_by_event_name, table_ews_by_thread_by_event_name, table_ews_by_user_by_event_name, table_replication_applier_status, table_esms_by_thread_by_event_name, table_ets_by_thread_by_event_name, table_ets_by_account_by_event_name, table_replication_group_member_stats, table_ets_by_host_by_event_name, table_ets_by_user_by_event_name, table_esms_by_account_by_event_name, table_ees_by_account_by_error, table_esgs_by_account_by_event_name, table_esgs_by_user_by_event_name, table_os_global_by_type, table_replication_applier_configuration, table_ees_by_thread_by_error, table_esgs_by_thread_by_event_name, table_socket_summary_by_instance, table_ees_by_host_by_error, table_ees_by_user_by_error, table_esgs_by_host_by_event_name, table_esms_by_host_by_event_name, table_esms_by_user_by_event_name, table_ews_global_by_event_name, table_mems_by_account_by_event_name, table_tiws_by_index_usage, table_mems_global_by_event_name, table_replication_group_members, table_mems_by_host_by_event_name, table_mems_by_thread_by_event_name, table_mems_by_user_by_event_name, table_file_instances, table_user_defined_functions, table_esms_by_digest, table_setup_actors, table_setup_objects, table_data_lock_waits, table_data_locks, table_ees_global_by_error, table_setup_instruments, table_session_status, table_esmh_global, table_esms_by_program, table_global_status, table_global_variables, table_persisted_variables, table_session_variables, table_all_instr, table_log_status, table_ets_global_by_event_name, table_tiws_by_table, table_tlws_by_table, table_esms_global_by_event_name, table_variables_info, table_esgs_global_by_event_name, table_socket_summary_by_event_name, table_file_summary_by_event_name, table_setup_consumers, table_setup_threads, cursor_by_thread_connect_attr, table_performance_timers, cursor_by_account, cursor_by_thread, table_plugin_table, cursor_by_host, and cursor_by_user.

Member Data Documentation

◆ m_index

PFS_engine_index_abstract* PFS_engine_table::m_index
protected

Current index.

◆ m_normalizer

time_normalizer* PFS_engine_table::m_normalizer
protected

Current normalizer.

◆ m_pos_ptr

void* PFS_engine_table::m_pos_ptr
protected

Opaque pointer to the m_pos position of this cursor.

◆ m_share_ptr

const PFS_engine_table_share* PFS_engine_table::m_share_ptr
protected

Table share.


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