25#ifndef TABLE_ESMH_BY_DIGEST_H
26#define TABLE_ESMH_BY_DIGEST_H
139 int rnd_pos(
const void *pos)
override;
141 int index_init(uint idx,
bool sorted)
override;
146 bool read_all)
override;
Definition: pfs_engine_table.h:301
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_esmh_by_digest.h:67
PFS_index_esmh_by_digest()
Definition: table_esmh_by_digest.h:69
bool match_bucket(ulong bucket_index)
Definition: table_esmh_by_digest.cc:96
PFS_key_bucket_number m_key_3
Definition: table_esmh_by_digest.h:83
bool match_digest(PFS_statements_digest_stat *pfs)
Definition: table_esmh_by_digest.cc:82
~PFS_index_esmh_by_digest() override=default
PFS_key_digest m_key_2
Definition: table_esmh_by_digest.h:82
PFS_key_schema m_key_1
Definition: table_esmh_by_digest.h:81
Definition: table_helper.h:1559
Definition: table_helper.h:1550
Definition: table_helper.h:1541
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST.
Definition: table_esmh_by_digest.h:126
pos_esmh_by_digest pos_t
Definition: table_esmh_by_digest.h:127
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:264
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:165
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_esmh_by_digest.cc:150
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_esmh_by_digest.cc:126
table_esmh_by_digest()
Definition: table_esmh_by_digest.cc:115
PFS_index_esmh_by_digest * m_opened_index
Definition: table_esmh_by_digest.h:172
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:113
PFS_statements_digest_stat * m_materialized_digest
Current row.
Definition: table_esmh_by_digest.h:164
static THR_LOCK m_table_lock
Table share lock.
Definition: table_esmh_by_digest.h:159
static PFS_engine_table_share m_share
Table share.
Definition: table_esmh_by_digest.h:131
~table_esmh_by_digest() override=default
row_esmh_by_digest m_row
Definition: table_esmh_by_digest.h:166
static int delete_all_rows()
Definition: table_esmh_by_digest.cc:108
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_esmh_by_digest.cc:104
pos_t m_pos
Current position.
Definition: table_esmh_by_digest.h:168
int index_init(uint idx, bool sorted) override
Definition: table_esmh_by_digest.cc:169
int make_row(PFS_statements_digest_stat *stat, ulong bucket_index)
Definition: table_esmh_by_digest.cc:232
static Plugin_table m_table_def
Table definition.
Definition: table_esmh_by_digest.h:161
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_esmh_by_digest.cc:121
pos_t m_next_pos
Next position.
Definition: table_esmh_by_digest.h:170
my_off_t ha_rows
Definition: my_base.h:1141
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
size_t digest_max
Definition: pfs_digest.cc:54
Statement Digest data structures (declarations).
#define NUMBER_OF_BUCKETS
Number of buckets used in histograms.
Definition: pfs_histogram.h:36
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
Row fragment for columns DIGEST, DIGEST_TEXT.
Definition: table_helper.h:566
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 row of table PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST.
Definition: table_esmh_by_digest.h:91
ulonglong m_count_bucket
Column COUNT_BUCKET.
Definition: table_esmh_by_digest.h:93
ulonglong m_count_bucket_and_lower
Column COUNT_BUCKET_AND_LOWER.
Definition: table_esmh_by_digest.h:95
Definition: table_esmh_by_digest.h:98
PFS_esmh_by_digest_bucket m_buckets[NUMBER_OF_BUCKETS]
Statistics for all buckets.
Definition: table_esmh_by_digest.h:103
PFS_digest_row m_digest
Columns SCHEMA_NAME, DIGEST.
Definition: table_esmh_by_digest.h:100
A statement digest stat record.
Definition: pfs_digest.h:59
Definition: thr_lock.h:139
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_HISTOGRAM_BY_DIGEST.
Definition: table_esmh_by_digest.h:47
pos_esmh_by_digest()
Definition: table_esmh_by_digest.h:48
bool has_more_digest()
Definition: table_esmh_by_digest.h:55
void next_digest()
Definition: table_esmh_by_digest.h:57
void reset()
Definition: table_esmh_by_digest.h:50
bool has_more_buckets()
Definition: table_esmh_by_digest.h:62
void next_bucket()
Definition: table_esmh_by_digest.h:64
Definition: table_esmh_by_digest.h:106
ulonglong m_count_bucket_and_lower
Column COUNT_BUCKET_AND_LOWER.
Definition: table_esmh_by_digest.h:120
ulong m_bucket_number
Column BUCKET_NUMBER.
Definition: table_esmh_by_digest.h:112
ulonglong m_bucket_timer_low
Column BUCKET_TIMER_LOW.
Definition: table_esmh_by_digest.h:114
ulonglong m_bucket_timer_high
Column BUCKET_TIMER_HIGH.
Definition: table_esmh_by_digest.h:116
double m_percentile
Column BUCKET_QUANTILE.
Definition: table_esmh_by_digest.h:122
ulonglong m_count_bucket
Column COUNT_BUCKET.
Definition: table_esmh_by_digest.h:118
Helpers to implement a performance schema table.