24#ifndef TABLE_ESMH_BY_DIGEST_H
25#define TABLE_ESMH_BY_DIGEST_H
138 int rnd_pos(
const void *pos)
override;
140 int index_init(uint idx,
bool sorted)
override;
145 bool read_all)
override;
Definition: pfs_engine_table.h:299
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Definition: table_esmh_by_digest.h:66
PFS_index_esmh_by_digest()
Definition: table_esmh_by_digest.h:68
bool match_bucket(ulong bucket_index)
Definition: table_esmh_by_digest.cc:95
PFS_key_bucket_number m_key_3
Definition: table_esmh_by_digest.h:82
bool match_digest(PFS_statements_digest_stat *pfs)
Definition: table_esmh_by_digest.cc:81
~PFS_index_esmh_by_digest() override=default
PFS_key_digest m_key_2
Definition: table_esmh_by_digest.h:81
PFS_key_schema m_key_1
Definition: table_esmh_by_digest.h:80
Definition: table_helper.h:1498
Definition: table_helper.h:1489
Definition: table_helper.h:1480
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
Table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST.
Definition: table_esmh_by_digest.h:125
pos_esmh_by_digest pos_t
Definition: table_esmh_by_digest.h:126
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_esmh_by_digest.cc:265
int index_next() override
Find key in index, read record.
Definition: table_esmh_by_digest.cc:177
PFS_esmh_by_digest_histogram m_materialized_histogram
Definition: table_esmh_by_digest.h:164
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_esmh_by_digest.cc:149
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_esmh_by_digest.cc:125
table_esmh_by_digest()
Definition: table_esmh_by_digest.cc:114
PFS_index_esmh_by_digest * m_opened_index
Definition: table_esmh_by_digest.h:171
void materialize(PFS_statements_digest_stat *stat)
Definition: table_esmh_by_digest.cc:207
static ha_rows get_row_count()
Definition: table_esmh_by_digest.cc:112
PFS_statements_digest_stat * m_materialized_digest
Current row.
Definition: table_esmh_by_digest.h:163
static THR_LOCK m_table_lock
Table share lock.
Definition: table_esmh_by_digest.h:158
static PFS_engine_table_share m_share
Table share.
Definition: table_esmh_by_digest.h:130
~table_esmh_by_digest() override=default
row_esmh_by_digest m_row
Definition: table_esmh_by_digest.h:165
static int delete_all_rows()
Definition: table_esmh_by_digest.cc:107
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_esmh_by_digest.cc:103
pos_t m_pos
Current position.
Definition: table_esmh_by_digest.h:167
int index_init(uint idx, bool sorted) override
Definition: table_esmh_by_digest.cc:168
int make_row(PFS_statements_digest_stat *stat, ulong bucket_index)
Definition: table_esmh_by_digest.cc:233
static Plugin_table m_table_def
Table definition.
Definition: table_esmh_by_digest.h:160
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_esmh_by_digest.cc:120
pos_t m_next_pos
Next position.
Definition: table_esmh_by_digest.h:169
my_off_t ha_rows
Definition: my_base.h:1139
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
size_t digest_max
Definition: pfs_digest.cc:50
Statement Digest data structures (declarations).
#define NUMBER_OF_BUCKETS
Number of buckets used in histograms.
Definition: pfs_histogram.h:35
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:65
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: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 row of table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST.
Definition: table_esmh_by_digest.h:90
ulonglong m_count_bucket
Column COUNT_BUCKET.
Definition: table_esmh_by_digest.h:92
ulonglong m_count_bucket_and_lower
Column COUNT_BUCKET_AND_LOWER.
Definition: table_esmh_by_digest.h:94
Definition: table_esmh_by_digest.h:97
PFS_esmh_by_digest_bucket m_buckets[NUMBER_OF_BUCKETS]
Statistics for all buckets.
Definition: table_esmh_by_digest.h:102
PFS_digest_row m_digest
Columns SCHEMA_NAME, DIGEST.
Definition: table_esmh_by_digest.h:99
A statement digest stat record.
Definition: pfs_digest.h:58
Definition: thr_lock.h:138
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST.
Definition: table_esmh_by_digest.h:46
pos_esmh_by_digest()
Definition: table_esmh_by_digest.h:47
bool has_more_digest()
Definition: table_esmh_by_digest.h:54
void next_digest()
Definition: table_esmh_by_digest.h:56
void reset()
Definition: table_esmh_by_digest.h:49
bool has_more_buckets()
Definition: table_esmh_by_digest.h:61
void next_bucket()
Definition: table_esmh_by_digest.h:63
Definition: table_esmh_by_digest.h:105
ulonglong m_count_bucket_and_lower
Column COUNT_BUCKET_AND_LOWER.
Definition: table_esmh_by_digest.h:119
ulong m_bucket_number
Column BUCKET_NUMBER.
Definition: table_esmh_by_digest.h:111
ulonglong m_bucket_timer_low
Column BUCKET_TIMER_LOW.
Definition: table_esmh_by_digest.h:113
ulonglong m_bucket_timer_high
Column BUCKET_TIMER_HIGH.
Definition: table_esmh_by_digest.h:115
double m_percentile
Column BUCKET_QUANTILE.
Definition: table_esmh_by_digest.h:121
ulonglong m_count_bucket
Column COUNT_BUCKET.
Definition: table_esmh_by_digest.h:117
Helpers to implement a performance schema table.