24#ifndef TABLE_EVENTS_STAGES_H
25#define TABLE_EVENTS_STAGES_H
124 bool read_all)
override;
149 int rnd_pos(
const void *pos)
override;
151 int index_init(uint idx,
bool sorted)
override;
190 int rnd_pos(
const void *pos)
override;
192 int index_init(uint idx,
bool sorted)
override;
226 int rnd_pos(
const void *pos)
override;
Definition: pfs_engine_table.h:301
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_events_stages.h:52
PFS_key_event_id m_key_2
Definition: table_events_stages.h:66
PFS_index_events_stages()
Definition: table_events_stages.h:54
~PFS_index_events_stages() override=default
bool match(PFS_thread *pfs)
Definition: table_events_stages.cc:168
PFS_key_thread_id m_key_1
Definition: table_events_stages.h:65
Definition: table_helper.h:1295
Definition: table_helper.h:1279
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Adapter, for table sharing the structure of PERFORMANCE_SCHEMA.EVENTS_STAGES_CURRENT.
Definition: table_events_stages.h:121
int make_row(PFS_events_stages *stage)
Build a row.
Definition: table_events_stages.cc:199
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_events_stages.cc:240
table_events_stages_common(const PFS_engine_table_share *share, void *pos)
Definition: table_events_stages.cc:188
~table_events_stages_common() override=default
row_events_stages m_row
Current row.
Definition: table_events_stages.h:133
Table PERFORMANCE_SCHEMA.EVENTS_STAGES_CURRENT.
Definition: table_events_stages.h:137
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_stages.cc:362
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_stages.cc:341
int index_next() override
Find key in index, read record.
Definition: table_events_stages.cc:383
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_stages.cc:346
PFS_simple_index m_next_pos
Next position.
Definition: table_events_stages.h:172
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_stages.cc:330
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_stages.h:165
static PFS_engine_table_share m_share
Table share.
Definition: table_events_stages.h:140
static ha_rows get_row_count()
Definition: table_events_stages.cc:413
table_events_stages_current()
Definition: table_events_stages.cc:335
PFS_simple_index m_pos
Current position.
Definition: table_events_stages.h:170
static Plugin_table m_table_def
Table definition.
Definition: table_events_stages.h:167
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_stages.cc:348
~table_events_stages_current() override=default
int index_init(uint idx, bool sorted) override
Definition: table_events_stages.cc:374
PFS_index_events_stages * m_opened_index
Definition: table_events_stages.h:174
static int delete_all_rows()
Definition: table_events_stages.cc:408
Table PERFORMANCE_SCHEMA.EVENTS_STAGES_HISTORY_LONG.
Definition: table_events_stages.h:216
static ha_rows get_row_count()
Definition: table_events_stages.cc:628
static PFS_engine_table_share m_share
Table share.
Definition: table_events_stages.h:219
~table_events_stages_history_long() override=default
static Plugin_table m_table_def
Table definition.
Definition: table_events_stages.h:239
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_stages.cc:560
static int delete_all_rows()
Definition: table_events_stages.cc:623
PFS_simple_index m_next_pos
Next position.
Definition: table_events_stages.h:244
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_stages.cc:565
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_stages.cc:567
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_stages.cc:594
table_events_stages_history_long()
Definition: table_events_stages.cc:557
PFS_simple_index m_pos
Current position.
Definition: table_events_stages.h:242
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_stages.h:237
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_stages.cc:552
Table PERFORMANCE_SCHEMA.EVENTS_STAGES_HISTORY.
Definition: table_events_stages.h:178
table_events_stages_history()
Definition: table_events_stages.cc:422
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_stages.cc:468
static ha_rows get_row_count()
Definition: table_events_stages.cc:547
int index_next() override
Find key in index, read record.
Definition: table_events_stages.cc:500
static Plugin_table m_table_def
Table definition.
Definition: table_events_stages.h:205
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_stages.cc:425
pos_events_stages_history m_next_pos
Next position.
Definition: table_events_stages.h:210
~table_events_stages_history() override=default
static int delete_all_rows()
Definition: table_events_stages.cc:542
PFS_index_events_stages * m_opened_index
Definition: table_events_stages.h:212
pos_events_stages_history m_pos
Current position.
Definition: table_events_stages.h:208
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_stages.cc:430
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_stages.h:203
static PFS_engine_table_share m_share
Table share.
Definition: table_events_stages.h:181
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_stages.cc:417
int index_init(uint idx, bool sorted) override
Definition: table_events_stages.cc:491
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_stages.cc:432
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
static PFS_engine_table_share_proxy share
Definition: connection_control_pfs_table.cc:73
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:76
enum_event_type
Enum values for the NESTING_EVENT_TYPE columns.
Definition: pfs_column_types.h:276
Performance schema tables (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
Position of a double cursor, for iterations using 2 nested loops.
Definition: pfs_engine_table.h:602
uint m_index_1
Outer index.
Definition: pfs_engine_table.h:604
uint m_index_2
Current index within index_1.
Definition: pfs_engine_table.h:606
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
A stage record.
Definition: pfs_events_stages.h:45
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Instrumented thread implementation.
Definition: pfs_instr.h:375
Definition: thr_lock.h:139
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_STAGES_HISTORY.
Definition: table_events_stages.h:103
pos_events_stages_history()
Definition: table_events_stages.h:104
void next_thread()
Definition: table_events_stages.h:111
void reset()
Definition: table_events_stages.h:106
A row of table_events_stages_common.
Definition: table_events_stages.h:70
enum_event_type m_nesting_event_type
Column NESTING_EVENT_TYPE.
Definition: table_events_stages.h:80
char m_source[COL_SOURCE_SIZE]
Column SOURCE.
Definition: table_events_stages.h:92
ulonglong m_event_id
Column EVENT_ID.
Definition: table_events_stages.h:74
ulonglong m_end_event_id
Column END_EVENT_ID.
Definition: table_events_stages.h:76
uint m_source_length
Length in bytes of m_source.
Definition: table_events_stages.h:94
bool m_progress
Definition: table_events_stages.h:95
ulonglong m_nesting_event_id
Column NESTING_EVENT_ID.
Definition: table_events_stages.h:78
ulonglong m_timer_wait
Column TIMER_WAIT.
Definition: table_events_stages.h:90
ulonglong m_work_completed
Column WORK_COMPLETED.
Definition: table_events_stages.h:97
uint m_name_length
Length in bytes of m_name.
Definition: table_events_stages.h:84
const char * m_name
Column EVENT_NAME.
Definition: table_events_stages.h:82
ulonglong m_timer_start
Column TIMER_START.
Definition: table_events_stages.h:86
ulonglong m_timer_end
Column TIMER_END.
Definition: table_events_stages.h:88
ulonglong m_thread_internal_id
Column THREAD_ID.
Definition: table_events_stages.h:72
ulonglong m_work_estimated
Column WORK_ESTIMATED.
Definition: table_events_stages.h:99
Helpers to implement a performance schema table.