24#ifndef TABLE_HOST_CACHE_H
25#define TABLE_HOST_CACHE_H
162 int rnd_pos(
const void *pos)
override;
169 bool read_all)
override;
An entry in the hostname hash table cache.
Definition: hostname_cache.h:126
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_host_cache.h:137
bool match(const row_host_cache *row) override
Definition: table_host_cache.cc:109
PFS_index_host_cache_by_host()
Definition: table_host_cache.h:139
~PFS_index_host_cache_by_host() override=default
PFS_key_host m_key
Definition: table_host_cache.h:147
Definition: table_host_cache.h:125
PFS_index_host_cache_by_ip()
Definition: table_host_cache.h:127
bool match(const row_host_cache *row) override
Definition: table_host_cache.cc:100
PFS_key_ip m_key
Definition: table_host_cache.h:134
~PFS_index_host_cache_by_ip() override=default
Definition: table_host_cache.h:115
PFS_index_host_cache(PFS_engine_key *key_1)
Definition: table_host_cache.h:117
~PFS_index_host_cache() override=default
virtual bool match(const row_host_cache *row)=0
Definition: table_helper.h:1498
Definition: table_helper.h:1605
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Table PERFORMANCE_SCHEMA.HOST_CACHE.
Definition: table_host_cache.h:151
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_host_cache.cc:267
static PFS_engine_table_share m_share
Table share.
Definition: table_host_cache.h:154
PFS_simple_index m_next_pos
Next position.
Definition: table_host_cache.h:191
table_host_cache()
Definition: table_host_cache.cc:146
int index_next() override
Find key in index, read record.
Definition: table_host_cache.cc:294
static THR_LOCK m_table_lock
Table share lock.
Definition: table_host_cache.h:180
static Plugin_table m_table_def
Table definition.
Definition: table_host_cache.h:182
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_host_cache.cc:250
row_host_cache * m_all_rows
Definition: table_host_cache.h:184
PFS_index_host_cache * m_opened_index
Definition: table_host_cache.h:193
static ha_rows get_row_count()
Definition: table_host_cache.cc:138
static int delete_all_rows()
Definition: table_host_cache.cc:128
void materialize(THD *thd)
Definition: table_host_cache.cc:154
row_host_cache * m_row
Current row.
Definition: table_host_cache.h:187
int index_init(uint idx, bool sorted) override
Definition: table_host_cache.cc:274
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_host_cache.cc:118
~table_host_cache() override=default
static int make_row(Host_entry *entry, row_host_cache *row)
Definition: table_host_cache.cc:196
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_host_cache.cc:245
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:313
uint m_row_count
Definition: table_host_cache.h:185
PFS_simple_index m_pos
Current position.
Definition: table_host_cache.h:189
#define PSI_HOSTNAME_LENGTH
Definition: psi_thread_bits.h:464
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Definition: buf0block_hint.cc:30
Performance schema tables (declarations).
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:567
Definition: thr_lock.h:139
Definition: completion_hash.h:35
A row of PERFORMANCE_SCHEMA.HOST_CACHE.
Definition: table_host_cache.h:52
ulonglong m_count_host_acl_errors
Column COUNT_HOST_ACL_ERRORS.
Definition: table_host_cache.h:78
ulonglong m_count_nameinfo_permanent_errors
Column COUNT_NAMEINFO_PERMANENT_ERRORS.
Definition: table_host_cache.h:68
char m_ip[64]
Column IP.
Definition: table_host_cache.h:54
uint m_hostname_length
Definition: table_host_cache.h:58
ulonglong m_count_max_user_connection_per_hour_errors
Column COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS.
Definition: table_host_cache.h:96
ulonglong m_count_init_connect_errors
Column COUNT_INIT_CONNECT_ERRORS.
Definition: table_host_cache.h:100
ulonglong m_count_ssl_errors
Column COUNT_SSL_ERRORS.
Definition: table_host_cache.h:92
ulonglong m_count_proxy_user_acl_errors
Column COUNT_PROXY_USER_ACL_ERRORS.
Definition: table_host_cache.h:88
ulonglong m_last_error_seen
Column LAST_ERROR_SEEN.
Definition: table_host_cache.h:112
ulonglong m_count_authentication_errors
Column COUNT_AUTHENTICATION_ERRORS.
Definition: table_host_cache.h:90
ulonglong m_count_no_auth_plugin_errors
Column COUNT_NO_AUTH_PLUGIN_ERRORS.
Definition: table_host_cache.h:80
ulonglong m_count_auth_plugin_errors
Column COUNT_AUTH_PLUGIN_ERRORS.
Definition: table_host_cache.h:82
ulonglong m_count_host_blocked_errors
Column COUNT_HOST_BLOCKED_ERRORS.
Definition: table_host_cache.h:64
ulonglong m_count_nameinfo_transient_errors
Column COUNT_NAMEINFO_TRANSIENT_ERRORS.
Definition: table_host_cache.h:66
ulonglong m_count_addrinfo_permanent_errors
Column COUNT_ADDRINFO_PERMANENT_ERRORS.
Definition: table_host_cache.h:74
ulonglong m_count_handshake_errors
Column COUNT_HANDSHAKE_ERRORS.
Definition: table_host_cache.h:84
ulonglong m_first_seen
Column FIRST_SEEN.
Definition: table_host_cache.h:106
char m_hostname[PSI_HOSTNAME_LENGTH]
Column HOST.
Definition: table_host_cache.h:57
ulonglong m_count_default_database_errors
Column COUNT_DEFAULT_DATABASE_ERRORS.
Definition: table_host_cache.h:98
ulonglong m_count_format_errors
Column COUNT_FORMAT_ERRORS.
Definition: table_host_cache.h:70
ulonglong m_first_error_seen
Column FIRST_ERROR_SEEN.
Definition: table_host_cache.h:110
ulonglong m_count_fcrdns_errors
Column COUNT_FCRDNS_ERRORS.
Definition: table_host_cache.h:76
bool m_host_validated
Column HOST_VALIDATED.
Definition: table_host_cache.h:60
ulonglong m_count_local_errors
Column COUNT_LOCAL_ERRORS.
Definition: table_host_cache.h:102
ulonglong m_sum_connect_errors
Column SUM_CONNECT_ERRORS.
Definition: table_host_cache.h:62
ulonglong m_count_addrinfo_transient_errors
Column COUNT_ADDRINFO_TRANSIENT_ERRORS.
Definition: table_host_cache.h:72
ulonglong m_count_max_user_connection_errors
Column COUNT_MAX_USER_CONNECTION_ERRORS.
Definition: table_host_cache.h:94
uint m_ip_length
Definition: table_host_cache.h:55
ulonglong m_last_seen
Column LAST_SEEN.
Definition: table_host_cache.h:108
ulonglong m_count_unknown_errors
Column COUNT_UNKNOWN_ERRORS.
Definition: table_host_cache.h:104
ulonglong m_count_proxy_user_errors
Column COUNT_PROXY_USER_ERRORS.
Definition: table_host_cache.h:86
Helpers to implement a performance schema table.
unsigned int uint
Definition: uca9-dump.cc:75