24#ifndef TABLE_PREPARED_STMT_INSTANCES
25#define TABLE_PREPARED_STMT_INSTANCES
114 m_key(
"OBJECT_INSTANCE_BEGIN") {}
175 m_key_2(
"OWNER_OBJECT_SCHEMA"),
176 m_key_3(
"OWNER_OBJECT_NAME") {}
200 int rnd_pos(
const void *pos)
override;
202 int index_init(uint idx,
bool sorted)
override;
207 bool read_all)
override;
Definition: pfs_engine_table.h:301
Definition: pfs_engine_table.h:268
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_prepared_stmt_instances.h:110
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:122
PFS_key_object_instance m_key
Definition: table_prepared_stmt_instances.h:121
~PFS_index_prepared_stmt_instances_by_instance() override=default
PFS_index_prepared_stmt_instances_by_instance()
Definition: table_prepared_stmt_instances.h:112
Definition: table_prepared_stmt_instances.h:170
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:168
PFS_index_prepared_stmt_instances_by_owner_object()
Definition: table_prepared_stmt_instances.h:172
PFS_key_object_type_enum m_key_1
Definition: table_prepared_stmt_instances.h:183
PFS_key_object_schema m_key_2
Definition: table_prepared_stmt_instances.h:184
PFS_key_object_name m_key_3
Definition: table_prepared_stmt_instances.h:185
~PFS_index_prepared_stmt_instances_by_owner_object() override=default
Definition: table_prepared_stmt_instances.h:125
PFS_index_prepared_stmt_instances_by_owner_thread()
Definition: table_prepared_stmt_instances.h:127
PFS_key_event_id m_key_2
Definition: table_prepared_stmt_instances.h:138
PFS_key_thread_id m_key_1
Definition: table_prepared_stmt_instances.h:137
~PFS_index_prepared_stmt_instances_by_owner_thread() override=default
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:132
Definition: table_prepared_stmt_instances.h:142
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:148
~PFS_index_prepared_stmt_instances_by_statement_id() override=default
PFS_index_prepared_stmt_instances_by_statement_id()
Definition: table_prepared_stmt_instances.h:144
PFS_key_statement_id m_key
Definition: table_prepared_stmt_instances.h:152
Definition: table_prepared_stmt_instances.h:156
PFS_index_prepared_stmt_instances_by_statement_name()
Definition: table_prepared_stmt_instances.h:158
PFS_key_statement_name m_key
Definition: table_prepared_stmt_instances.h:166
bool match(const PFS_prepared_stmt *pfs) override
Definition: table_prepared_stmt_instances.cc:158
~PFS_index_prepared_stmt_instances_by_statement_name() override=default
Definition: table_prepared_stmt_instances.h:90
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:99
PFS_index_prepared_stmt_instances(PFS_engine_key *key_1, PFS_engine_key *key_2)
Definition: table_prepared_stmt_instances.h:95
PFS_index_prepared_stmt_instances(PFS_engine_key *key_1)
Definition: table_prepared_stmt_instances.h:92
~PFS_index_prepared_stmt_instances() override=default
Definition: table_helper.h:1295
Definition: table_helper.h:1734
Definition: table_helper.h:1671
Definition: table_helper.h:1656
Definition: table_helper.h:1715
Definition: table_helper.h:1337
Definition: table_helper.h:1636
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
Table PERFORMANCE_SCHEMA.PREPARED_STATEMENT_INSTANCES.
Definition: table_prepared_stmt_instances.h:189
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_prepared_stmt_instances.cc:190
PFS_simple_index m_pos
Current position.
Definition: table_prepared_stmt_instances.h:225
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_prepared_stmt_instances.cc:212
static PFS_engine_table_share m_share
Table share.
Definition: table_prepared_stmt_instances.h:192
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_prepared_stmt_instances.cc:232
int index_next() override
Find key in index, read record.
Definition: table_prepared_stmt_instances.cc:274
row_prepared_stmt_instances m_row
Current row.
Definition: table_prepared_stmt_instances.h:223
PFS_index_prepared_stmt_instances * m_opened_index
Definition: table_prepared_stmt_instances.h:229
int index_init(uint idx, bool sorted) override
Definition: table_prepared_stmt_instances.cc:245
static int delete_all_rows()
Definition: table_prepared_stmt_instances.cc:195
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:336
int make_row(PFS_prepared_stmt *)
Definition: table_prepared_stmt_instances.cc:294
static Plugin_table m_table_def
Table definition.
Definition: table_prepared_stmt_instances.h:220
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_prepared_stmt_instances.cc:217
static THR_LOCK m_table_lock
Table share lock.
Definition: table_prepared_stmt_instances.h:218
PFS_simple_index m_next_pos
Next position.
Definition: table_prepared_stmt_instances.h:227
static ha_rows get_row_count()
Definition: table_prepared_stmt_instances.cc:200
table_prepared_stmt_instances()
Definition: table_prepared_stmt_instances.cc:204
~table_prepared_stmt_instances() override=default
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
#define COL_INFO_SIZE
Size of INFO columns, in bytes.
Definition: pfs_column_types.h:71
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:227
Stored Program data structures (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
Definition: pfs_name.h:344
Definition: pfs_prepared_stmt.h:42
Definition: pfs_name.h:194
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Row fragment for single statistics columns (COUNT, SUM, MIN, AVG, MAX)
Definition: table_helper.h:689
Row fragment for statement statistics columns.
Definition: table_helper.h:874
Definition: thr_lock.h:139
A row of table PERFORMANCE_SCHEMA.PREPARED_STATEMENT_INSTANCES.
Definition: table_prepared_stmt_instances.h:47
char m_sql_text[COL_INFO_SIZE]
Column SQL_TEXT.
Definition: table_prepared_stmt_instances.h:59
bool m_secondary
Column EXECUTION_ENGINE.
Definition: table_prepared_stmt_instances.h:84
PFS_stat_row m_prepare_stat
Columns TIMER_PREPARE.
Definition: table_prepared_stmt_instances.h:78
PFS_schema_name m_owner_object_schema
Column OWNER_OBJECT_SCHEMA.
Definition: table_prepared_stmt_instances.h:72
enum_object_type m_owner_object_type
Column OWNER_OBJECT_TYPE.
Definition: table_prepared_stmt_instances.h:69
PFS_stat_row m_reprepare_stat
Columns COUNT_REPREPARE.
Definition: table_prepared_stmt_instances.h:81
ulonglong m_owner_event_id
Column OWNER_EVENT_ID.
Definition: table_prepared_stmt_instances.h:66
ulonglong m_owner_thread_id
Column OWNER_THREAD_ID.
Definition: table_prepared_stmt_instances.h:63
char m_stmt_name[COL_INFO_SIZE]
Column STMT_NAME.
Definition: table_prepared_stmt_instances.h:55
ulonglong m_stmt_id
Column STMT_ID.
Definition: table_prepared_stmt_instances.h:52
const void * m_identity
Column OBJECT_INSTANCE_BEGIN.
Definition: table_prepared_stmt_instances.h:49
PFS_statement_stat_row m_execute_stat
Columns COUNT_STAR...SUM_NO_GOOD_INDEX_USED.
Definition: table_prepared_stmt_instances.h:87
int m_stmt_name_length
Definition: table_prepared_stmt_instances.h:56
int m_sql_text_length
Definition: table_prepared_stmt_instances.h:60
PFS_object_name m_owner_object_name
Column OWNER_OBJECT_NAME.
Definition: table_prepared_stmt_instances.h:75
Helpers to implement a performance schema table.