23#ifndef TABLE_EVENTS_STAGES_H
24#define TABLE_EVENTS_STAGES_H
123 bool read_all)
override;
148 int rnd_pos(
const void *pos)
override;
150 int index_init(uint idx,
bool sorted)
override;
189 int rnd_pos(
const void *pos)
override;
191 int index_init(uint idx,
bool sorted)
override;
225 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_stages.h:51
PFS_key_event_id m_key_2
Definition: table_events_stages.h:65
PFS_index_events_stages()
Definition: table_events_stages.h:53
~PFS_index_events_stages() override=default
bool match(PFS_thread *pfs)
Definition: table_events_stages.cc:167
PFS_key_thread_id m_key_1
Definition: table_events_stages.h:64
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_STAGES_CURRENT.
Definition: table_events_stages.h:120
int make_row(PFS_events_stages *stage)
Build a row.
Definition: table_events_stages.cc:198
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:239
table_events_stages_common(const PFS_engine_table_share *share, void *pos)
Definition: table_events_stages.cc:187
~table_events_stages_common() override=default
row_events_stages m_row
Current row.
Definition: table_events_stages.h:132
Table PERFORMANCE_SCHEMA.EVENTS_STAGES_CURRENT.
Definition: table_events_stages.h:136
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_stages.cc:360
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_stages.cc:337
int index_next() override
Find key in index, read record.
Definition: table_events_stages.cc:384
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_stages.cc:342
PFS_simple_index m_next_pos
Next position.
Definition: table_events_stages.h:171
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_stages.cc:329
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_stages.h:164
static PFS_engine_table_share m_share
Table share.
Definition: table_events_stages.h:139
static ha_rows get_row_count()
Definition: table_events_stages.cc:414
table_events_stages_current()
Definition: table_events_stages.cc:334
PFS_simple_index m_pos
Current position.
Definition: table_events_stages.h:169
static Plugin_table m_table_def
Table definition.
Definition: table_events_stages.h:166
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_stages.cc:344
~table_events_stages_current() override=default
int index_init(uint idx, bool sorted) override
Definition: table_events_stages.cc:375
PFS_index_events_stages * m_opened_index
Definition: table_events_stages.h:173
static int delete_all_rows()
Definition: table_events_stages.cc:409
Table PERFORMANCE_SCHEMA.EVENTS_STAGES_HISTORY_LONG.
Definition: table_events_stages.h:215
static ha_rows get_row_count()
Definition: table_events_stages.cc:632
static PFS_engine_table_share m_share
Table share.
Definition: table_events_stages.h:218
~table_events_stages_history_long() override=default
static Plugin_table m_table_def
Table definition.
Definition: table_events_stages.h:238
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_stages.cc:564
static int delete_all_rows()
Definition: table_events_stages.cc:627
PFS_simple_index m_next_pos
Next position.
Definition: table_events_stages.h:243
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_stages.cc:569
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_stages.cc:571
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_stages.cc:598
table_events_stages_history_long()
Definition: table_events_stages.cc:561
PFS_simple_index m_pos
Current position.
Definition: table_events_stages.h:241
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_stages.h:236
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_stages.cc:556
Table PERFORMANCE_SCHEMA.EVENTS_STAGES_HISTORY.
Definition: table_events_stages.h:177
table_events_stages_history()
Definition: table_events_stages.cc:423
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_stages.cc:469
static ha_rows get_row_count()
Definition: table_events_stages.cc:551
int index_next() override
Find key in index, read record.
Definition: table_events_stages.cc:504
static Plugin_table m_table_def
Table definition.
Definition: table_events_stages.h:204
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_stages.cc:426
pos_events_stages_history m_next_pos
Next position.
Definition: table_events_stages.h:209
~table_events_stages_history() override=default
static int delete_all_rows()
Definition: table_events_stages.cc:546
PFS_index_events_stages * m_opened_index
Definition: table_events_stages.h:211
pos_events_stages_history m_pos
Current position.
Definition: table_events_stages.h:207
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_stages.cc:431
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_stages.h:202
static PFS_engine_table_share m_share
Table share.
Definition: table_events_stages.h:180
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_stages.cc:418
int index_init(uint idx, bool sorted) override
Definition: table_events_stages.cc:495
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_stages.cc:433
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
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
Definition: buf0block_hint.cc:29
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
enum_event_type
Enum values for the NESTING_EVENT_TYPE columns.
Definition: pfs_column_types.h:269
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 stage record.
Definition: pfs_events_stages.h:44
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_STAGES_HISTORY.
Definition: table_events_stages.h:102
pos_events_stages_history()
Definition: table_events_stages.h:103
void next_thread()
Definition: table_events_stages.h:110
void reset()
Definition: table_events_stages.h:105
A row of table_events_stages_common.
Definition: table_events_stages.h:69
enum_event_type m_nesting_event_type
Column NESTING_EVENT_TYPE.
Definition: table_events_stages.h:79
char m_source[COL_SOURCE_SIZE]
Column SOURCE.
Definition: table_events_stages.h:91
ulonglong m_event_id
Column EVENT_ID.
Definition: table_events_stages.h:73
ulonglong m_end_event_id
Column END_EVENT_ID.
Definition: table_events_stages.h:75
uint m_source_length
Length in bytes of m_source.
Definition: table_events_stages.h:93
bool m_progress
Definition: table_events_stages.h:94
ulonglong m_nesting_event_id
Column NESTING_EVENT_ID.
Definition: table_events_stages.h:77
ulonglong m_timer_wait
Column TIMER_WAIT.
Definition: table_events_stages.h:89
ulonglong m_work_completed
Column WORK_COMPLETED.
Definition: table_events_stages.h:96
uint m_name_length
Length in bytes of m_name.
Definition: table_events_stages.h:83
const char * m_name
Column EVENT_NAME.
Definition: table_events_stages.h:81
ulonglong m_timer_start
Column TIMER_START.
Definition: table_events_stages.h:85
ulonglong m_timer_end
Column TIMER_END.
Definition: table_events_stages.h:87
ulonglong m_thread_internal_id
Column THREAD_ID.
Definition: table_events_stages.h:71
ulonglong m_work_estimated
Column WORK_ESTIMATED.
Definition: table_events_stages.h:98
Helpers to implement a performance schema table.