23#ifndef TABLE_EVENTS_WAITS_H
24#define TABLE_EVENTS_WAITS_H
155 bool read_all)
override;
182 int index_init(uint idx,
bool sorted)
override;
185 int rnd_pos(
const void *pos)
override;
226 int index_init(uint idx,
bool sorted)
override;
230 int rnd_pos(
const void *pos)
override;
265 int rnd_pos(
const void *pos)
override;
Definition: pfs_engine_table.h:299
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Definition: table_events_waits.h:131
bool match(PFS_thread *pfs)
Definition: table_events_waits.cc:47
PFS_index_events_waits()
Definition: table_events_waits.h:133
~PFS_index_events_waits() override=default
PFS_key_thread_id m_key_1
Definition: table_events_waits.h:144
PFS_key_event_id m_key_2
Definition: table_events_waits.h:145
Definition: table_helper.h:1267
Definition: table_helper.h:1251
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
Adapter, for table sharing the structure of PERFORMANCE_SCHEMA.EVENTS_WAITS_CURRENT.
Definition: table_events_waits.h:152
int make_row(PFS_events_waits *wait)
Build a row.
Definition: table_events_waits.cc:559
int make_file_object_columns(PFS_events_waits *wait)
Definition: table_events_waits.cc:289
row_events_waits m_row
Current row.
Definition: table_events_waits.h:170
int make_table_object_columns(PFS_events_waits *wait)
Definition: table_events_waits.cc:223
table_events_waits_common(const PFS_engine_table_share *share, void *pos)
Definition: table_events_waits.cc:210
int make_metadata_lock_object_columns(PFS_events_waits *wait)
Definition: table_events_waits.cc:377
void clear_object_columns()
Definition: table_events_waits.cc:216
~table_events_waits_common() override=default
int make_socket_object_columns(PFS_events_waits *wait)
Definition: table_events_waits.cc:321
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_events_waits.cc:770
Table PERFORMANCE_SCHEMA.EVENTS_WAITS_CURRENT.
Definition: table_events_waits.h:174
static int delete_all_rows()
Definition: table_events_waits.cc:1067
pos_events_waits_current m_pos
Current position.
Definition: table_events_waits.h:208
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_waits.cc:993
static PFS_engine_table_share m_share
Table share.
Definition: table_events_waits.h:177
PFS_events_waits * get_wait(PFS_thread *pfs_thread, uint index_2)
Definition: table_events_waits.cc:926
int make_row(PFS_thread *thread, PFS_events_waits *wait)
Definition: table_events_waits.cc:1049
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_waits.cc:914
int index_init(uint idx, bool sorted) override
Definition: table_events_waits.cc:1011
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_waits.cc:973
table_events_waits_current()
Definition: table_events_waits.cc:918
int index_next() override
Find key in index, read record.
Definition: table_events_waits.cc:1020
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_waits.cc:921
static ha_rows get_row_count()
Definition: table_events_waits.cc:1072
pos_events_waits_current m_next_pos
Next position.
Definition: table_events_waits.h:210
~table_events_waits_current() override=default
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_waits.h:200
static Plugin_table m_table_def
Table definition.
Definition: table_events_waits.h:202
PFS_index_events_waits * m_opened_index
Definition: table_events_waits.h:212
Table PERFORMANCE_SCHEMA.EVENTS_WAITS_HISTORY_LONG.
Definition: table_events_waits.h:256
PFS_simple_index m_next_pos
Next position.
Definition: table_events_waits.h:283
static int delete_all_rows()
Definition: table_events_waits.cc:1294
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_waits.cc:1265
~table_events_waits_history_long() override=default
PFS_simple_index m_pos
Current position.
Definition: table_events_waits.h:281
table_events_waits_history_long()
Definition: table_events_waits.cc:1230
static ha_rows get_row_count()
Definition: table_events_waits.cc:1299
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_waits.cc:1238
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_waits.cc:1233
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_waits.cc:1225
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_waits.h:276
static Plugin_table m_table_def
Table definition.
Definition: table_events_waits.h:278
static PFS_engine_table_share m_share
Table share.
Definition: table_events_waits.h:259
Table PERFORMANCE_SCHEMA.EVENTS_WAITS_HISTORY.
Definition: table_events_waits.h:216
table_events_waits_history()
Definition: table_events_waits.cc:1080
int make_row(PFS_thread *thread, PFS_events_waits *wait)
Definition: table_events_waits.cc:1197
int index_next() override
Find key in index, read record.
Definition: table_events_waits.cc:1164
int index_init(uint idx, bool sorted) override
Definition: table_events_waits.cc:1155
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_waits.cc:1135
pos_events_waits_history m_next_pos
Next position.
Definition: table_events_waits.h:250
static PFS_engine_table_share m_share
Table share.
Definition: table_events_waits.h:219
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_waits.cc:1083
PFS_events_waits * get_wait(PFS_thread *pfs_thread, uint index_2)
Definition: table_events_waits.cc:1088
PFS_index_events_waits * m_opened_index
Definition: table_events_waits.h:252
pos_events_waits_history m_pos
Current position.
Definition: table_events_waits.h:248
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_waits.cc:1111
~table_events_waits_history() override=default
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_waits.cc:1076
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_waits.h:240
static Plugin_table m_table_def
Table definition.
Definition: table_events_waits.h:242
static ha_rows get_row_count()
Definition: table_events_waits.cc:1220
static int delete_all_rows()
Definition: table_events_waits.cc:1215
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1139
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
intptr_t intptr
Definition: my_inttypes.h:69
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
Definition: buf0block_hint.cc:29
static int wait(mysql_cond_t *that, mysql_mutex_t *mutex, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:51
Data types for columns used in the performance schema tables (declarations)
#define COL_SOURCE_SIZE
Size of the SOURCE columns, in bytes.
Definition: pfs_column_types.h:75
#define COL_INDEX_NAME_SIZE
Size of the INDEX_NAME columns, in bytes.
Definition: pfs_column_types.h:59
enum_event_type
Enum values for the NESTING_EVENT_TYPE columns.
Definition: pfs_column_types.h:269
#define COL_OBJECT_NAME_EXTENDED_SIZE
Size of the extended OBJECT_NAME columns, in bytes.
Definition: pfs_column_types.h:49
enum_operation_type
Enum values for the various OPERATION columns.
Definition: pfs_column_types.h:124
Performance schema tables (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:65
Position of a double cursor, for iterations using 2 nested loops.
Definition: pfs_engine_table.h:592
uint m_index_1
Outer index.
Definition: pfs_engine_table.h:594
uint m_index_2
Current index within index_1.
Definition: pfs_engine_table.h:596
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
A wait event record.
Definition: pfs_events_waits.h:68
Definition: pfs_name.h:117
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:557
Instrumented thread implementation.
Definition: pfs_instr.h:374
Definition: thr_lock.h:138
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_WAITS_CURRENT.
Definition: table_events_waits.h:102
pos_events_waits_current()
Definition: table_events_waits.h:103
void next_thread()
Definition: table_events_waits.h:110
void reset()
Definition: table_events_waits.h:105
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_WAITS_HISTORY.
Definition: table_events_waits.h:117
pos_events_waits_history()
Definition: table_events_waits.h:118
void reset()
Definition: table_events_waits.h:120
void next_thread()
Definition: table_events_waits.h:125
A row of table_events_waits_common.
Definition: table_events_waits.h:52
uint m_flags
Column FLAGS.
Definition: table_events_waits.h:98
const char * m_name
Column EVENT_NAME.
Definition: table_events_waits.h:64
ulonglong m_end_event_id
Column END_EVENT_ID.
Definition: table_events_waits.h:58
const char * m_object_type
Column OBJECT_TYPE.
Definition: table_events_waits.h:74
ulonglong m_event_id
Column EVENT_ID.
Definition: table_events_waits.h:56
ulonglong m_number_of_bytes
Column NUMBER_OF_BYTES.
Definition: table_events_waits.h:96
char m_source[COL_SOURCE_SIZE]
Column SOURCE.
Definition: table_events_waits.h:90
ulonglong m_timer_end
Column TIMER_END.
Definition: table_events_waits.h:70
enum_operation_type m_operation
Column OPERATION.
Definition: table_events_waits.h:94
ulonglong m_thread_internal_id
Column THREAD_ID.
Definition: table_events_waits.h:54
PFS_schema_name m_object_schema
Column OBJECT_SCHEMA.
Definition: table_events_waits.h:78
ulonglong m_nesting_event_id
Column NESTING_EVENT_ID.
Definition: table_events_waits.h:60
uint m_object_type_length
Length in bytes of m_object_type.
Definition: table_events_waits.h:76
uint m_source_length
Length in bytes of m_source.
Definition: table_events_waits.h:92
ulonglong m_timer_start
Column TIMER_START.
Definition: table_events_waits.h:68
uint m_object_name_length
Length in bytes of m_object_name.
Definition: table_events_waits.h:82
char m_object_name[COL_OBJECT_NAME_EXTENDED_SIZE]
Column OBJECT_NAME.
Definition: table_events_waits.h:80
enum_event_type m_nesting_event_type
Column NESTING_EVENT_TYPE.
Definition: table_events_waits.h:62
char m_index_name[COL_INDEX_NAME_SIZE]
Column INDEX_NAME.
Definition: table_events_waits.h:84
intptr m_object_instance_addr
Column OBJECT_INSTANCE_BEGIN.
Definition: table_events_waits.h:88
uint m_name_length
Length in bytes of m_name.
Definition: table_events_waits.h:66
uint m_index_name_length
Length in bytes of m_index_name.
Definition: table_events_waits.h:86
ulonglong m_timer_wait
Column TIMER_WAIT.
Definition: table_events_waits.h:72
Helpers to implement a performance schema table.