24#ifndef TABLE_SESSION_CONNECT_H
25#define TABLE_SESSION_CONNECT_H
40#define MAX_ATTR_NAME_CHARS 32
41#define MAX_ATTR_VALUE_CHARS 1024
42#define MAX_UTF8MB4_BYTES 4
97 int index_init(uint idx,
bool sorted)
override;
103 bool read_all)
override;
116bool read_nth_attr(
const char *connect_attrs, uint connect_attrs_length,
118 char *attr_name, uint max_attr_name, uint *attr_name_length,
119 char *attr_value, uint max_attr_value,
120 uint *attr_value_length);
Definition: pfs_engine_table.h:300
Definition: table_session_connect.h:71
virtual bool match(PFS_thread *pfs)
Definition: table_session_connect.cc:41
~PFS_index_session_connect() override=default
PFS_index_session_connect()
Definition: table_session_connect.h:73
PFS_key_name m_key_2
Definition: table_session_connect.h:85
PFS_key_processlist_id m_key_1
Definition: table_session_connect.h:84
Definition: table_helper.h:1554
Definition: table_helper.h:1309
Cursor CURSOR_BY_THREAD_CONNECT_ATTR.
Definition: cursor_by_thread_connect_attr.h:61
Abstract table PERFORMANCE_SCHEMA.SESSION_CONNECT_ATTRS.
Definition: table_session_connect.h:89
int index_init(uint idx, bool sorted) override
Definition: table_session_connect.cc:77
~table_session_connect() override
Definition: table_session_connect.cc:73
table_session_connect(const PFS_engine_table_share *share)
Definition: table_session_connect.cc:61
int index_next() override
Find key in index, read record.
Definition: table_session_connect.cc:84
char * m_copy_session_connect_attrs
Safe copy of PFS_thread::m_session_connect_attrs.
Definition: table_session_connect.h:109
uint m_copy_session_connect_attrs_length
Safe copy of PFS_thread::m_session_connect_attrs_length.
Definition: table_session_connect.h:111
PFS_index_session_connect * m_opened_index
Definition: table_session_connect.h:113
row_session_connect_attrs m_row
Current row.
Definition: table_session_connect.h:107
int make_row(PFS_thread *pfs, uint ordinal) override
Definition: table_session_connect.cc:236
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_session_connect.cc:312
virtual bool thread_fits(PFS_thread *thread)
Definition: table_session_connect.cc:353
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
Data types for columns used in the performance schema tables (declarations)
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
Definition: m_ctype.h:423
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:358
Instrumented thread implementation.
Definition: pfs_instr.h:375
A row of PERFORMANCE_SCHEMA.SESSION_CONNECT_ATTRS and PERFORMANCE_SCHEMA.SESSION_ACCOUNT_CONNECT_ATTR...
Definition: table_session_connect.h:56
char m_attr_name[MAX_ATTR_NAME_CHARS *MAX_UTF8MB4_BYTES]
Column ATTR_NAME.
Definition: table_session_connect.h:60
ulong m_process_id
Column PROCESS_ID.
Definition: table_session_connect.h:58
uint m_attr_value_length
Length in bytes of m_attr_name.
Definition: table_session_connect.h:66
char m_attr_value[MAX_ATTR_VALUE_CHARS *MAX_UTF8MB4_BYTES]
Column ATTR_VALUE.
Definition: table_session_connect.h:64
ulong m_ordinal_position
Column ORDINAL_POSITION.
Definition: table_session_connect.h:68
uint m_attr_name_length
Length in bytes of m_attr_name.
Definition: table_session_connect.h:62
Helpers to implement a performance schema table.
#define MAX_ATTR_VALUE_CHARS
Definition: table_session_connect.h:41
#define MAX_UTF8MB4_BYTES
Definition: table_session_connect.h:42
bool read_nth_attr(const char *connect_attrs, uint connect_attrs_length, const CHARSET_INFO *connect_attrs_cs, uint ordinal, char *attr_name, uint max_attr_name, uint *attr_name_length, char *attr_value, uint max_attr_value, uint *attr_value_length)
Take the nth attribute name/value pair.
Definition: table_session_connect.cc:192
field_offsets
symbolic names for field offsets, keep in sync with field_types
Definition: table_session_connect.h:45
@ FO_ORDINAL_POSITION
Definition: table_session_connect.h:49
@ FO_ATTR_NAME
Definition: table_session_connect.h:47
@ FO_ATTR_VALUE
Definition: table_session_connect.h:48
@ FO_PROCESS_ID
Definition: table_session_connect.h:46
#define MAX_ATTR_NAME_CHARS
Definition: table_session_connect.h:40