23#ifndef TABLE_PREPARED_STMT_INSTANCES
24#define TABLE_PREPARED_STMT_INSTANCES
113 m_key(
"OBJECT_INSTANCE_BEGIN") {}
174 m_key_2(
"OWNER_OBJECT_SCHEMA"),
175 m_key_3(
"OWNER_OBJECT_NAME") {}
199 int rnd_pos(
const void *pos)
override;
201 int index_init(uint idx,
bool sorted)
override;
206 bool read_all)
override;
Definition: pfs_engine_table.h:299
Definition: pfs_engine_table.h:267
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Definition: table_prepared_stmt_instances.h:109
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:121
PFS_key_object_instance m_key
Definition: table_prepared_stmt_instances.h:120
~PFS_index_prepared_stmt_instances_by_instance() override=default
PFS_index_prepared_stmt_instances_by_instance()
Definition: table_prepared_stmt_instances.h:111
Definition: table_prepared_stmt_instances.h:169
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:167
PFS_index_prepared_stmt_instances_by_owner_object()
Definition: table_prepared_stmt_instances.h:171
PFS_key_object_type_enum m_key_1
Definition: table_prepared_stmt_instances.h:182
PFS_key_object_schema m_key_2
Definition: table_prepared_stmt_instances.h:183
PFS_key_object_name m_key_3
Definition: table_prepared_stmt_instances.h:184
~PFS_index_prepared_stmt_instances_by_owner_object() override=default
Definition: table_prepared_stmt_instances.h:124
PFS_index_prepared_stmt_instances_by_owner_thread()
Definition: table_prepared_stmt_instances.h:126
PFS_key_event_id m_key_2
Definition: table_prepared_stmt_instances.h:137
PFS_key_thread_id m_key_1
Definition: table_prepared_stmt_instances.h:136
~PFS_index_prepared_stmt_instances_by_owner_thread() override=default
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:131
Definition: table_prepared_stmt_instances.h:141
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:147
~PFS_index_prepared_stmt_instances_by_statement_id() override=default
PFS_index_prepared_stmt_instances_by_statement_id()
Definition: table_prepared_stmt_instances.h:143
PFS_key_statement_id m_key
Definition: table_prepared_stmt_instances.h:151
Definition: table_prepared_stmt_instances.h:155
PFS_index_prepared_stmt_instances_by_statement_name()
Definition: table_prepared_stmt_instances.h:157
PFS_key_statement_name m_key
Definition: table_prepared_stmt_instances.h:165
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:157
~PFS_index_prepared_stmt_instances_by_statement_name() override=default
Definition: table_prepared_stmt_instances.h:89
virtual bool match(const PFS_prepared_stmt *pfs)=0
PFS_index_prepared_stmt_instances(PFS_engine_key *key_1, PFS_engine_key *key_2, PFS_engine_key *key_3)
Definition: table_prepared_stmt_instances.h:98
PFS_index_prepared_stmt_instances(PFS_engine_key *key_1, PFS_engine_key *key_2)
Definition: table_prepared_stmt_instances.h:94
PFS_index_prepared_stmt_instances(PFS_engine_key *key_1)
Definition: table_prepared_stmt_instances.h:91
~PFS_index_prepared_stmt_instances() override=default
Definition: table_helper.h:1267
Definition: table_helper.h:1673
Definition: table_helper.h:1610
Definition: table_helper.h:1595
Definition: table_helper.h:1654
Definition: table_helper.h:1309
Definition: table_helper.h:1575
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
Table PERFORMANCE_SCHEMA.PREPARED_STATEMENT_INSTANCES.
Definition: table_prepared_stmt_instances.h:188
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_prepared_stmt_instances.cc:189
PFS_simple_index m_pos
Current position.
Definition: table_prepared_stmt_instances.h:224
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_prepared_stmt_instances.cc:208
static PFS_engine_table_share m_share
Table share.
Definition: table_prepared_stmt_instances.h:191
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_prepared_stmt_instances.cc:228
int index_next() override
Find key in index, read record.
Definition: table_prepared_stmt_instances.cc:270
row_prepared_stmt_instances m_row
Current row.
Definition: table_prepared_stmt_instances.h:222
PFS_index_prepared_stmt_instances * m_opened_index
Definition: table_prepared_stmt_instances.h:228
int index_init(uint idx, bool sorted) override
Definition: table_prepared_stmt_instances.cc:241
static int delete_all_rows()
Definition: table_prepared_stmt_instances.cc:194
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_prepared_stmt_instances.cc:332
int make_row(PFS_prepared_stmt *)
Definition: table_prepared_stmt_instances.cc:290
static Plugin_table m_table_def
Table definition.
Definition: table_prepared_stmt_instances.h:219
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_prepared_stmt_instances.cc:213
static THR_LOCK m_table_lock
Table share lock.
Definition: table_prepared_stmt_instances.h:217
PFS_simple_index m_next_pos
Next position.
Definition: table_prepared_stmt_instances.h:226
static ha_rows get_row_count()
Definition: table_prepared_stmt_instances.cc:199
table_prepared_stmt_instances()
Definition: table_prepared_stmt_instances.cc:203
~table_prepared_stmt_instances() override=default
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
#define COL_INFO_SIZE
Size of INFO columns, in bytes.
Definition: pfs_column_types.h:70
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:221
Stored Program data structures (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:65
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
Definition: pfs_name.h:184
Definition: pfs_prepared_stmt.h:41
Definition: pfs_name.h:117
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:557
Row fragment for single statistics columns (COUNT, SUM, MIN, AVG, MAX)
Definition: table_helper.h:661
Row fragment for statement statistics columns.
Definition: table_helper.h:846
Definition: thr_lock.h:138
A row of table PERFORMANCE_SCHEMA.PREPARED_STATEMENT_INSTANCES.
Definition: table_prepared_stmt_instances.h:46
char m_sql_text[COL_INFO_SIZE]
Column SQL_TEXT.
Definition: table_prepared_stmt_instances.h:58
bool m_secondary
Column EXECUTION_ENGINE.
Definition: table_prepared_stmt_instances.h:83
PFS_stat_row m_prepare_stat
Columns TIMER_PREPARE.
Definition: table_prepared_stmt_instances.h:77
PFS_schema_name m_owner_object_schema
Column OWNER_OBJECT_SCHEMA.
Definition: table_prepared_stmt_instances.h:71
enum_object_type m_owner_object_type
Column OWNER_OBJECT_TYPE.
Definition: table_prepared_stmt_instances.h:68
PFS_stat_row m_reprepare_stat
Columns COUNT_REPREPARE.
Definition: table_prepared_stmt_instances.h:80
ulonglong m_owner_event_id
Column OWNER_EVENT_ID.
Definition: table_prepared_stmt_instances.h:65
ulonglong m_owner_thread_id
Column OWNER_THREAD_ID.
Definition: table_prepared_stmt_instances.h:62
char m_stmt_name[COL_INFO_SIZE]
Column STMT_NAME.
Definition: table_prepared_stmt_instances.h:54
ulonglong m_stmt_id
Column STMT_ID.
Definition: table_prepared_stmt_instances.h:51
const void * m_identity
Column OBJECT_INSTANCE_BEGIN.
Definition: table_prepared_stmt_instances.h:48
PFS_statement_stat_row m_execute_stat
Columns COUNT_STAR...SUM_NO_GOOD_INDEX_USED.
Definition: table_prepared_stmt_instances.h:86
int m_stmt_name_length
Definition: table_prepared_stmt_instances.h:55
int m_sql_text_length
Definition: table_prepared_stmt_instances.h:59
PFS_object_name m_owner_object_name
Column OWNER_OBJECT_NAME.
Definition: table_prepared_stmt_instances.h:74
Helpers to implement a performance schema table.