23#ifndef TABLE_HOST_CACHE_H
24#define TABLE_HOST_CACHE_H
161 int rnd_pos(
const void *pos)
override;
163 int index_init(uint idx,
bool sorted)
override;
168 bool read_all)
override;
An entry in the hostname hash table cache.
Definition: hostname_cache.h:125
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_host_cache.h:136
bool match(const row_host_cache *row) override
Definition: table_host_cache.cc:108
PFS_index_host_cache_by_host()
Definition: table_host_cache.h:138
~PFS_index_host_cache_by_host() override=default
PFS_key_host m_key
Definition: table_host_cache.h:146
Definition: table_host_cache.h:124
PFS_index_host_cache_by_ip()
Definition: table_host_cache.h:126
bool match(const row_host_cache *row) override
Definition: table_host_cache.cc:99
PFS_key_ip m_key
Definition: table_host_cache.h:133
~PFS_index_host_cache_by_ip() override=default
Definition: table_host_cache.h:114
PFS_index_host_cache(PFS_engine_key *key_1)
Definition: table_host_cache.h:116
~PFS_index_host_cache() override=default
virtual bool match(const row_host_cache *row)=0
Definition: table_helper.h:1458
Definition: table_helper.h:1565
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Table PERFORMANCE_SCHEMA.HOST_CACHE.
Definition: table_host_cache.h:150
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_host_cache.cc:266
static PFS_engine_table_share m_share
Table share.
Definition: table_host_cache.h:153
PFS_simple_index m_next_pos
Next position.
Definition: table_host_cache.h:190
table_host_cache()
Definition: table_host_cache.cc:145
int index_next() override
Find key in index, read record.
Definition: table_host_cache.cc:293
static THR_LOCK m_table_lock
Table share lock.
Definition: table_host_cache.h:179
static Plugin_table m_table_def
Table definition.
Definition: table_host_cache.h:181
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_host_cache.cc:249
row_host_cache * m_all_rows
Definition: table_host_cache.h:183
PFS_index_host_cache * m_opened_index
Definition: table_host_cache.h:192
static ha_rows get_row_count()
Definition: table_host_cache.cc:137
static int delete_all_rows()
Definition: table_host_cache.cc:127
void materialize(THD *thd)
Definition: table_host_cache.cc:153
row_host_cache * m_row
Current row.
Definition: table_host_cache.h:186
int index_init(uint idx, bool sorted) override
Definition: table_host_cache.cc:273
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_host_cache.cc:117
~table_host_cache() override=default
static int make_row(Host_entry *entry, row_host_cache *row)
Definition: table_host_cache.cc:195
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_host_cache.cc:244
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_host_cache.cc:312
uint m_row_count
Definition: table_host_cache.h:184
PFS_simple_index m_pos
Current position.
Definition: table_host_cache.h:188
#define PSI_HOSTNAME_LENGTH
Definition: psi_thread_bits.h:463
This file includes constants used by all storage engines.
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
Performance schema tables (declarations).
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:557
Definition: thr_lock.h:138
Definition: completion_hash.h:34
A row of PERFORMANCE_SCHEMA.HOST_CACHE.
Definition: table_host_cache.h:51
ulonglong m_count_host_acl_errors
Column COUNT_HOST_ACL_ERRORS.
Definition: table_host_cache.h:77
ulonglong m_count_nameinfo_permanent_errors
Column COUNT_NAMEINFO_PERMANENT_ERRORS.
Definition: table_host_cache.h:67
char m_ip[64]
Column IP.
Definition: table_host_cache.h:53
uint m_hostname_length
Definition: table_host_cache.h:57
ulonglong m_count_max_user_connection_per_hour_errors
Column COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS.
Definition: table_host_cache.h:95
ulonglong m_count_init_connect_errors
Column COUNT_INIT_CONNECT_ERRORS.
Definition: table_host_cache.h:99
ulonglong m_count_ssl_errors
Column COUNT_SSL_ERRORS.
Definition: table_host_cache.h:91
ulonglong m_count_proxy_user_acl_errors
Column COUNT_PROXY_USER_ACL_ERRORS.
Definition: table_host_cache.h:87
ulonglong m_last_error_seen
Column LAST_ERROR_SEEN.
Definition: table_host_cache.h:111
ulonglong m_count_authentication_errors
Column COUNT_AUTHENTICATION_ERRORS.
Definition: table_host_cache.h:89
ulonglong m_count_no_auth_plugin_errors
Column COUNT_NO_AUTH_PLUGIN_ERRORS.
Definition: table_host_cache.h:79
ulonglong m_count_auth_plugin_errors
Column COUNT_AUTH_PLUGIN_ERRORS.
Definition: table_host_cache.h:81
ulonglong m_count_host_blocked_errors
Column COUNT_HOST_BLOCKED_ERRORS.
Definition: table_host_cache.h:63
ulonglong m_count_nameinfo_transient_errors
Column COUNT_NAMEINFO_TRANSIENT_ERRORS.
Definition: table_host_cache.h:65
ulonglong m_count_addrinfo_permanent_errors
Column COUNT_ADDRINFO_PERMANENT_ERRORS.
Definition: table_host_cache.h:73
ulonglong m_count_handshake_errors
Column COUNT_HANDSHAKE_ERRORS.
Definition: table_host_cache.h:83
ulonglong m_first_seen
Column FIRST_SEEN.
Definition: table_host_cache.h:105
char m_hostname[PSI_HOSTNAME_LENGTH]
Column HOST.
Definition: table_host_cache.h:56
ulonglong m_count_default_database_errors
Column COUNT_DEFAULT_DATABASE_ERRORS.
Definition: table_host_cache.h:97
ulonglong m_count_format_errors
Column COUNT_FORMAT_ERRORS.
Definition: table_host_cache.h:69
ulonglong m_first_error_seen
Column FIRST_ERROR_SEEN.
Definition: table_host_cache.h:109
ulonglong m_count_fcrdns_errors
Column COUNT_FCRDNS_ERRORS.
Definition: table_host_cache.h:75
bool m_host_validated
Column HOST_VALIDATED.
Definition: table_host_cache.h:59
ulonglong m_count_local_errors
Column COUNT_LOCAL_ERRORS.
Definition: table_host_cache.h:101
ulonglong m_sum_connect_errors
Column SUM_CONNECT_ERRORS.
Definition: table_host_cache.h:61
ulonglong m_count_addrinfo_transient_errors
Column COUNT_ADDRINFO_TRANSIENT_ERRORS.
Definition: table_host_cache.h:71
ulonglong m_count_max_user_connection_errors
Column COUNT_MAX_USER_CONNECTION_ERRORS.
Definition: table_host_cache.h:93
uint m_ip_length
Definition: table_host_cache.h:54
ulonglong m_last_seen
Column LAST_SEEN.
Definition: table_host_cache.h:107
ulonglong m_count_unknown_errors
Column COUNT_UNKNOWN_ERRORS.
Definition: table_host_cache.h:103
ulonglong m_count_proxy_user_errors
Column COUNT_PROXY_USER_ERRORS.
Definition: table_host_cache.h:85
Helpers to implement a performance schema table.