MySQL 8.0.39
Source Code Documentation
|
TABLE SESSION_CONNECT (abstract) More...
#include <sys/types.h>
#include "storage/perfschema/cursor_by_thread_connect_attr.h"
#include "storage/perfschema/pfs_column_types.h"
#include "storage/perfschema/table_helper.h"
Go to the source code of this file.
Classes | |
struct | row_session_connect_attrs |
A row of PERFORMANCE_SCHEMA.SESSION_CONNECT_ATTRS and PERFORMANCE_SCHEMA.SESSION_ACCOUNT_CONNECT_ATTRS. More... | |
class | PFS_index_session_connect |
class | table_session_connect |
Abstract table PERFORMANCE_SCHEMA.SESSION_CONNECT_ATTRS. More... | |
Macros | |
#define | MAX_ATTR_NAME_CHARS 32 |
#define | MAX_ATTR_VALUE_CHARS 1024 |
#define | MAX_UTF8MB4_BYTES 4 |
Enumerations | |
enum | field_offsets { FO_PROCESS_ID , FO_ATTR_NAME , FO_ATTR_VALUE , FO_ORDINAL_POSITION } |
symbolic names for field offsets, keep in sync with field_types More... | |
Functions | |
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. More... | |
TABLE SESSION_CONNECT (abstract)
#define MAX_ATTR_NAME_CHARS 32 |
#define MAX_ATTR_VALUE_CHARS 1024 |
#define MAX_UTF8MB4_BYTES 4 |
enum field_offsets |
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.
Parse the attributes blob form the beginning, skipping the attributes whose number is lower than the one we seek. When we reach the attribute at an index we're looking for the values are copied to the output parameters. If parsing fails or no more attributes are found the function stops and returns an error code.
connect_attrs | pointer to the connect attributes blob | |
connect_attrs_length | length of connect_attrs | |
connect_attrs_cs | character set used to encode connect_attrs | |
ordinal | index of the attribute we need | |
[out] | attr_name | buffer to receive the attribute name |
max_attr_name | max size of attr_name in bytes | |
[out] | attr_name_length | number of bytes written in attr_name |
[out] | attr_value | buffer to receive the attribute name |
max_attr_value | max size of attr_value in bytes | |
[out] | attr_value_length | number of bytes written in attr_value |
true | requested attribute pair is found and copied |
false | error. Either because of parsing or too few attributes. |