24#ifndef TABLE_EVENTS_STATEMENTS_H
25#define TABLE_EVENTS_STATEMENTS_H
211 bool read_all)
override;
241 int rnd_pos(
const void *pos)
override;
285 int rnd_pos(
const void *pos)
override;
322 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_statements.h:57
bool match(PFS_thread *pfs)
Definition: table_events_statements.cc:271
PFS_key_event_id m_key_2
Definition: table_events_statements.h:71
~PFS_index_events_statements() override=default
PFS_key_thread_id m_key_1
Definition: table_events_statements.h:70
PFS_index_events_statements()
Definition: table_events_statements.h:59
Definition: table_helper.h:1294
Definition: table_helper.h:1278
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
Adapter, for table sharing the structure of PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_CURRENT.
Definition: table_events_statements.h:208
unsigned char m_token_array[MAX_DIGEST_STORAGE_SIZE]
Definition: table_events_statements.h:225
int make_row_part_2(const sql_digest_storage *digest)
Build a row, part 2.
Definition: table_events_statements.cc:398
~table_events_statements_common() override=default
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_events_statements.cc:423
int make_row_part_1(PFS_events_statements *statement, sql_digest_storage *digest)
Build a row, part 1.
Definition: table_events_statements.cc:304
row_events_statements m_row
Current row.
Definition: table_events_statements.h:224
table_events_statements_common(const PFS_engine_table_share *share, void *pos)
Definition: table_events_statements.cc:289
Table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_CURRENT.
Definition: table_events_statements.h:229
pos_events_statements_current m_next_pos
Next position.
Definition: table_events_statements.h:266
static int delete_all_rows()
Definition: table_events_statements.cc:796
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_statements.cc:661
static PFS_engine_table_share m_share
Table share.
Definition: table_events_statements.h:232
~table_events_statements_current() override=default
PFS_index_events_statements * m_opened_index
Definition: table_events_statements.h:268
static ha_rows get_row_count()
Definition: table_events_statements.cc:801
static Plugin_table m_table_def
Table definition.
Definition: table_events_statements.h:259
int index_init(uint idx, bool sorted) override
Definition: table_events_statements.cc:805
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_statements.cc:654
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_statements.h:257
int index_next() override
Find key in index, read record.
Definition: table_events_statements.cc:729
int make_row(PFS_thread *pfs_thread, PFS_events_statements *statement)
Definition: table_events_statements.cc:771
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_statements.cc:694
pos_events_statements_current m_pos
Current position.
Definition: table_events_statements.h:264
table_events_statements_current()
Definition: table_events_statements.cc:651
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_statements.cc:646
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_statements.cc:659
Table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTORY_LONG.
Definition: table_events_statements.h:312
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_statements.cc:992
int make_row(PFS_events_statements *statement)
Definition: table_events_statements.cc:1048
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_statements.cc:990
PFS_simple_index m_next_pos
Next position.
Definition: table_events_statements.h:342
PFS_simple_index m_pos
Current position.
Definition: table_events_statements.h:340
~table_events_statements_history_long() override=default
static int delete_all_rows()
Definition: table_events_statements.cc:1061
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_statements.cc:975
table_events_statements_history_long()
Definition: table_events_statements.cc:980
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_statements.cc:1019
static PFS_engine_table_share m_share
Table share.
Definition: table_events_statements.h:315
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_statements.cc:985
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_statements.h:333
static Plugin_table m_table_def
Table definition.
Definition: table_events_statements.h:335
static ha_rows get_row_count()
Definition: table_events_statements.cc:1066
Table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTORY.
Definition: table_events_statements.h:272
static int delete_all_rows()
Definition: table_events_statements.cc:955
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_statements.cc:828
static Plugin_table m_table_def
Table definition.
Definition: table_events_statements.h:298
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_statements.h:296
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_statements.cc:866
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_statements.cc:815
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_statements.cc:830
static PFS_engine_table_share m_share
Table share.
Definition: table_events_statements.h:275
PFS_index_events_statements * m_opened_index
Definition: table_events_statements.h:307
int index_init(uint idx, bool sorted) override
Definition: table_events_statements.cc:965
int index_next() override
Find key in index, read record.
Definition: table_events_statements.cc:891
static ha_rows get_row_count()
Definition: table_events_statements.cc:960
table_events_statements_history()
Definition: table_events_statements.cc:820
pos_events_statements_history m_pos
Current position.
Definition: table_events_statements.h:303
int make_row(PFS_thread *pfs_thread, PFS_events_statements *statement)
Definition: table_events_statements.cc:934
pos_events_statements_history m_next_pos
Next position.
Definition: table_events_statements.h:305
~table_events_statements_history() override=default
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_statements.cc:823
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Common definition between mysql server & client.
#define MYSQL_ERRMSG_SIZE
Max length of a error message.
Definition: mysql_com.h:880
#define SQLSTATE_LENGTH
Definition: mysql_com.h:75
Definition: buf0block_hint.cc:30
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:270
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:222
Performance schema tables (declarations).
Object names (declarations).
#define MAX_DIGEST_STORAGE_SIZE
Definition: sql_digest.h:34
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
Our own string classes, used pervasively throughout the executor.
Row fragment for columns DIGEST, DIGEST_TEXT.
Definition: table_helper.h:565
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 statement record.
Definition: pfs_events_statements.h:47
An event record.
Definition: pfs_events.h:38
Definition: pfs_name.h:336
Definition: pfs_name.h:186
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Instrumented thread implementation.
Definition: pfs_instr.h:373
Definition: thr_lock.h:139
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_CURRENT.
Definition: table_events_statements.h:175
pos_events_statements_current()
Definition: table_events_statements.h:176
void reset()
Definition: table_events_statements.h:178
void next_thread()
Definition: table_events_statements.h:183
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTORY.
Definition: table_events_statements.h:190
pos_events_statements_history()
Definition: table_events_statements.h:191
void reset()
Definition: table_events_statements.h:193
void next_thread()
Definition: table_events_statements.h:198
A row of table_events_statements_common.
Definition: table_events_statements.h:75
ulonglong m_select_scan
Column SELECT_SCAN.
Definition: table_events_statements.h:148
ulonglong m_sort_range
Column SORT_RANGE.
Definition: table_events_statements.h:152
ulonglong m_sort_rows
Column SORT_ROWS.
Definition: table_events_statements.h:154
ulonglong m_sort_scan
Column SORT_SCAN.
Definition: table_events_statements.h:156
ulonglong m_timer_start
Column TIMER_START.
Definition: table_events_statements.h:93
PFS_schema_name m_schema_name
Column OBJECT_SCHEMA.
Definition: table_events_statements.h:114
PFS_schema_name m_current_schema_name
Column CURRENT_SCHEMA.
Definition: table_events_statements.h:109
ulonglong m_statement_id
Column STATEMENT_ID.
Definition: table_events_statements.h:169
ulonglong m_timer_end
Column TIMER_END.
Definition: table_events_statements.h:95
const char * m_name
Column EVENT_NAME.
Definition: table_events_statements.h:89
PFS_object_name m_object_name
Column OBJECT_NAME.
Definition: table_events_statements.h:116
uint m_warning_count
Column WARNINGS.
Definition: table_events_statements.h:128
char m_message_text[MYSQL_ERRMSG_SIZE+1]
Column MESSAGE_TEXT.
Definition: table_events_statements.h:119
ulonglong m_no_index_used
Column NO_INDEX_USED.
Definition: table_events_statements.h:158
ulonglong m_sort_merge_passes
Column SORT_MERGE_PASSES.
Definition: table_events_statements.h:150
String m_sqltext
Column SQL_TEXT.
Definition: table_events_statements.h:105
bool m_secondary
Column EXECUTION_ENGINE.
Definition: table_events_statements.h:171
ulonglong m_no_good_index_used
Column NO_GOOD_INDEX_USED.
Definition: table_events_statements.h:160
ulonglong m_timer_wait
Column TIMER_WAIT.
Definition: table_events_statements.h:97
ulonglong m_max_controlled_memory
Column MAX_CONTROLLED_MEMORY.
Definition: table_events_statements.h:164
ulonglong m_select_range
Column SELECT_RANGE.
Definition: table_events_statements.h:144
ulonglong m_lock_time
Column LOCK_TIME.
Definition: table_events_statements.h:99
enum_event_type m_nesting_event_type
Column NESTING_EVENT_TYPE.
Definition: table_events_statements.h:85
ulonglong m_select_range_check
Column SELECT_RANGE_CHECK.
Definition: table_events_statements.h:146
uint m_name_length
Length in bytes of m_name.
Definition: table_events_statements.h:91
ulonglong m_thread_internal_id
Column THREAD_ID.
Definition: table_events_statements.h:77
ulonglong m_created_tmp_disk_tables
Column CREATED_TMP_DISK_TABLES.
Definition: table_events_statements.h:136
ulonglong m_select_full_join
Column SELECT_FULL_JOIN.
Definition: table_events_statements.h:140
ulonglong m_rows_examined
Column ROWS_EXAMINED.
Definition: table_events_statements.h:134
char m_source[COL_SOURCE_SIZE]
Column SOURCE.
Definition: table_events_statements.h:101
ulonglong m_nesting_event_id
Column NESTING_EVENT_ID.
Definition: table_events_statements.h:83
ulonglong m_rows_affected
Column ROWS_AFFECTED.
Definition: table_events_statements.h:130
ulonglong m_select_full_range_join
Column SELECT_FULL_RANGE_JOIN.
Definition: table_events_statements.h:142
uint m_nesting_event_level
Column NESTING_EVENT_LEVEL.
Definition: table_events_statements.h:87
char m_sqlstate[SQLSTATE_LENGTH]
Column RETURNED_SQLSTATE.
Definition: table_events_statements.h:124
ulonglong m_cpu_time
Column CPU_TIME.
Definition: table_events_statements.h:162
ulonglong m_rows_sent
Column ROWS_SENT.
Definition: table_events_statements.h:132
uint m_source_length
Length in bytes of m_source.
Definition: table_events_statements.h:103
uint m_message_text_length
Definition: table_events_statements.h:120
enum_object_type m_object_type
Column OBJECT_TYPE.
Definition: table_events_statements.h:112
ulonglong m_created_tmp_tables
Column CREATED_TMP_TABLES.
Definition: table_events_statements.h:138
ulonglong m_event_id
Column EVENT_ID.
Definition: table_events_statements.h:79
ulonglong m_end_event_id
Column END_EVENT_ID.
Definition: table_events_statements.h:81
PFS_digest_row m_digest
Column DIGEST and DIGEST_TEXT.
Definition: table_events_statements.h:107
uint m_sql_errno
Column MYSQL_ERRNO.
Definition: table_events_statements.h:122
uint m_error_count
Column ERRORS.
Definition: table_events_statements.h:126
ulonglong m_max_total_memory
Column MAX_TOTAL_MEMORY.
Definition: table_events_statements.h:166
Structure to store token count/array for a statement on which digest is to be calculated.
Definition: sql_digest.h:98
Definition: mysqlslap.cc:217
Helpers to implement a performance schema table.
unsigned int uint
Definition: uca9-dump.cc:75