MySQL 8.0.30
Source Code Documentation
table_helper.cc File Reference

Performance schema table helpers (implementation). More...

Macros

#define COMMON_STATELESS_MATCH
 

Functions

void set_field_tiny (Field *f, long value)
 Helper, assign a value to a tinyint field. More...
 
void set_field_utiny (Field *f, ulong value)
 Helper, assign a value to a unsigned tinyint field. More...
 
long get_field_tiny (Field *f)
 Helper, read a value from an tinyint field. More...
 
ulong get_field_utiny (Field *f)
 
void set_field_short (Field *f, long value)
 Helper, assign a value to a short field. More...
 
void set_field_ushort (Field *f, ulong value)
 Helper, assign a value to a unsigned short field. More...
 
long get_field_short (Field *f)
 Helper, read a value from an smallint field. More...
 
ulong get_field_ushort (Field *f)
 
void set_field_medium (Field *f, long value)
 Helper, assign a value to a medium field. More...
 
void set_field_umedium (Field *f, ulong value)
 Helper, assign a value to a unsigned medium field. More...
 
long get_field_medium (Field *f)
 Helper, read a value from an mediumint field. More...
 
ulong get_field_umedium (Field *f)
 
void set_field_long (Field *f, long value)
 Helper, assign a value to a long field. More...
 
void set_field_ulong (Field *f, ulong value)
 Helper, assign a value to a ulong field. More...
 
long get_field_long (Field *f)
 Helper, read a value from a long field. More...
 
ulong get_field_ulong (Field *f)
 
void set_field_longlong (Field *f, longlong value)
 Helper, assign a value to a longlong field. More...
 
void set_field_ulonglong (Field *f, ulonglong value)
 Helper, assign a value to a ulonglong field. More...
 
longlong get_field_longlong (Field *f)
 
ulonglong get_field_ulonglong (Field *f)
 Helper, read a value from an ulonglong field. More...
 
void set_field_decimal (Field *f, double value)
 Helper, assign a value to a decimal field. More...
 
double get_field_decimal (Field *f)
 Helper, read a value from a decimal field. More...
 
void set_field_float (Field *f, double value)
 Helper, assign a value to a float field. More...
 
double get_field_float (Field *f)
 Helper, read a value from a float field. More...
 
void set_field_double (Field *f, double value)
 Helper, assign a value to a double field. More...
 
double get_field_double (Field *f)
 Helper, read a value from a double field. More...
 
void set_field_char_utf8 (Field *f, const char *str, uint len)
 Helper, assign a value to a. More...
 
Stringget_field_char_utf8 (Field *f, String *val)
 Helper, read a value from a. More...
 
char * get_field_char_utf8 (Field *f, char *val, uint *len)
 Helper, read a value from a. More...
 
void set_field_varchar (Field *f, const CHARSET_INFO *cs, const char *str, uint len)
 Helper, assign a value to a. More...
 
void set_field_varchar_utf8 (Field *f, const char *str)
 Helper, assign a value to a. More...
 
void set_field_varchar_utf8 (Field *f, const char *str, size_t len)
 Helper, assign a value to a. More...
 
Stringget_field_varchar_utf8 (Field *f, String *val)
 Helper, read a value from a. More...
 
char * get_field_varchar_utf8 (Field *f, char *val, uint *len)
 Helper, read a value from a. More...
 
void set_field_varchar_utf8mb4 (Field *f, const char *str)
 Helper, assign a value to a. More...
 
void set_field_varchar_utf8mb4 (Field *f, const char *str, uint len)
 Helper, assign a value to a. More...
 
void set_field_blob (Field *f, const char *val, size_t len)
 Helper, assign a value to a text/blob field. More...
 
void set_field_text (Field *f, const char *val, size_t len, const CHARSET_INFO *cs)
 Helper, assign a value to a text field. More...
 
char * get_field_blob (Field *f, char *val, uint *len)
 Helper, read a value from a blob field. More...
 
void set_field_enum (Field *f, ulonglong value)
 Helper, assign a value to an enum field. More...
 
ulonglong get_field_enum (Field *f)
 Helper, read a value from an enum field. More...
 
void set_field_set (Field *f, ulonglong value)
 Helper, assign a value to a set field. More...
 
ulonglong get_field_set (Field *f)
 Helper, read a value from a set field. More...
 
void set_field_date (Field *f, const char *value, uint len)
 Helper, assign a value to a date field. More...
 
char * get_field_date (Field *f, char *val, uint *len)
 Helper, read a value from an date field. More...
 
void set_field_time (Field *f, const char *value, uint len)
 Helper, assign a value to a time field. More...
 
char * get_field_time (Field *f, char *val, uint *len)
 Helper, read a value from an time field. More...
 
void set_field_datetime (Field *f, const char *value, uint len)
 Helper, assign a value to a datetime field. More...
 
char * get_field_datetime (Field *f, char *val, uint *len)
 Helper, read a value from an datetime field. More...
 
void set_field_timestamp (Field *f, const char *value, uint len)
 Helper, assign a value to a timestamp field. More...
 
char * get_field_timestamp (Field *f, char *val, uint *len)
 Helper, read a value from an timestamp field. More...
 
void set_field_timestamp (Field *f, ulonglong value)
 Helper, assign a value to a timestamp field. More...
 
void set_field_year (Field *f, ulong value)
 Helper, assign a value to a year field. More...
 
ulong get_field_year (Field *f)
 Helper, read a value from an year field. More...
 
void set_field_json (Field *f, const Json_wrapper *json)
 Helper, assign a value to a JSON field. More...
 
void set_nullable_field_schema_name (Field *f, const PFS_schema_name *schema)
 
void set_field_schema_name (Field *f, const PFS_schema_name *schema)
 
void set_nullable_field_object_name (Field *f, const PFS_object_name *object)
 
void set_field_object_name (Field *f, const PFS_object_name *object)
 
void set_nullable_field_routine_name (Field *f, const PFS_routine_name *object)
 
void set_field_routine_name (Field *f, const PFS_routine_name *object)
 
void set_field_host_name (Field *f, const PFS_host_name *host)
 
void set_nullable_field_host_name (Field *f, const PFS_host_name *host)
 
void set_field_user_name (Field *f, const PFS_user_name *user)
 
void set_nullable_field_user_name (Field *f, const PFS_user_name *user)
 
void format_sqltext (const char *source_sqltext, size_t source_length, const CHARSET_INFO *source_cs, bool truncated, String &sqltext)
 Helper, format sql text for output. More...
 
void make_source_column (const char *source_file, size_t source_line, char row_buffer[], size_t row_buffer_size, uint &row_length)
 Create a SOURCE column from source file and line. More...
 
void set_field_object_type (Field *f, enum_object_type object_type)
 
void set_field_lock_type (Field *f, PFS_TL_LOCK_TYPE lock_type)
 
void set_field_mdl_type (Field *f, opaque_mdl_type mdl_type)
 
void set_field_mdl_duration (Field *f, opaque_mdl_duration mdl_duration)
 
void set_field_mdl_status (Field *f, opaque_mdl_status mdl_status)
 
void set_field_isolation_level (Field *f, enum_isolation_level iso_level)
 
void set_field_xa_state (Field *f, enum_xa_transaction_state xa_state)
 

Detailed Description

Performance schema table helpers (implementation).

Macro Definition Documentation

◆ COMMON_STATELESS_MATCH

#define COMMON_STATELESS_MATCH
Value:
int cmp = 0; \
if (is_null) { \
cmp = (record_null ? 0 : 1); \
} else { \
if (record_null) { \
cmp = -1; \
} else if (record_value < m_key_value) { \
cmp = -1; \
} else if (record_value > m_key_value) { \
cmp = +1; \
} else { \
cmp = 0; \
} \
} \
switch (find_flag) { \
return (cmp == 0); \
return (cmp >= 0); \
return (cmp <= 0); \
return (cmp < 0); \
return (cmp > 0); \
default: \
assert(false); \
return false; \
}
static int cmp(Bigint *a, Bigint *b)
Definition: dtoa.cc:1064
@ HA_READ_KEY_OR_PREV
Definition: my_base.h:80
@ HA_READ_KEY_EXACT
Definition: my_base.h:78
@ HA_READ_AFTER_KEY
Definition: my_base.h:81
@ HA_READ_BEFORE_KEY
Definition: my_base.h:82
@ HA_READ_KEY_OR_NEXT
Definition: my_base.h:79

Function Documentation

◆ set_field_host_name()

void set_field_host_name ( Field f,
const PFS_host_name host 
)

◆ set_field_user_name()

void set_field_user_name ( Field f,
const PFS_user_name user 
)

◆ set_nullable_field_host_name()

void set_nullable_field_host_name ( Field f,
const PFS_host_name host 
)

◆ set_nullable_field_user_name()

void set_nullable_field_user_name ( Field f,
const PFS_user_name user 
)