MySQL 9.1.0
Source Code Documentation
MY_CHARSET_HANDLER Struct Reference

#include <m_ctype.h>

Public Attributes

bool(* init )(CHARSET_INFO *, MY_CHARSET_LOADER *loader, MY_CHARSET_ERRMSG *)
 
unsigned(* ismbchar )(const CHARSET_INFO *, const char *, const char *)
 
unsigned(* mbcharlen )(const CHARSET_INFO *, unsigned c)
 
size_t(* numchars )(const CHARSET_INFO *, const char *b, const char *e)
 
size_t(* charpos )(const CHARSET_INFO *, const char *b, const char *e, size_t pos)
 Return at which byte codepoint number "pos" begins, relative to the start of the string. More...
 
size_t(* well_formed_len )(const CHARSET_INFO *, const char *b, const char *e, size_t nchars, int *error)
 
size_t(* lengthsp )(const CHARSET_INFO *, const char *ptr, size_t length)
 Given a pointer and a length in bytes, returns a new length in bytes where all trailing space characters are stripped. More...
 
size_t(* numcells )(const CHARSET_INFO *, const char *b, const char *e)
 
my_charset_conv_mb_wc mb_wc
 
my_charset_conv_wc_mb wc_mb
 
int(* ctype )(const CHARSET_INFO *cs, int *ctype, const uint8_t *s, const uint8_t *e)
 
size_t(* caseup_str )(const CHARSET_INFO *, char *)
 
size_t(* casedn_str )(const CHARSET_INFO *, char *)
 
my_charset_conv_case caseup
 
my_charset_conv_case casedn
 
size_t(* snprintf )(const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)
 
size_t(* long10_to_str )(const CHARSET_INFO *, char *to, size_t n, int radix, long int val)
 
size_t(* longlong10_to_str )(const CHARSET_INFO *, char *to, size_t n, int radix, long long val)
 
void(* fill )(const CHARSET_INFO *, char *to, size_t len, int fill)
 
long(* strntol )(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
unsigned long(* strntoul )(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
long long(* strntoll )(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
unsigned long long(* strntoull )(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
double(* strntod )(const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)
 
long long(* strtoll10 )(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
 
unsigned long long(* strntoull10rnd )(const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, const char **endptr, int *error)
 
size_t(* scan )(const CHARSET_INFO *, const char *b, const char *e, int sq)
 

Member Data Documentation

◆ casedn

my_charset_conv_case MY_CHARSET_HANDLER::casedn

◆ casedn_str

size_t(* MY_CHARSET_HANDLER::casedn_str) (const CHARSET_INFO *, char *)

◆ caseup

my_charset_conv_case MY_CHARSET_HANDLER::caseup

◆ caseup_str

size_t(* MY_CHARSET_HANDLER::caseup_str) (const CHARSET_INFO *, char *)

◆ charpos

size_t(* MY_CHARSET_HANDLER::charpos) (const CHARSET_INFO *, const char *b, const char *e, size_t pos)

Return at which byte codepoint number "pos" begins, relative to the start of the string.

If the string is shorter than or is exactly "pos" codepoints long, returns a value equal or greater to (e-b).

◆ ctype

int(* MY_CHARSET_HANDLER::ctype) (const CHARSET_INFO *cs, int *ctype, const uint8_t *s, const uint8_t *e)

◆ fill

void(* MY_CHARSET_HANDLER::fill) (const CHARSET_INFO *, char *to, size_t len, int fill)

◆ init

bool(* MY_CHARSET_HANDLER::init) (CHARSET_INFO *, MY_CHARSET_LOADER *loader, MY_CHARSET_ERRMSG *)

◆ ismbchar

unsigned(* MY_CHARSET_HANDLER::ismbchar) (const CHARSET_INFO *, const char *, const char *)

◆ lengthsp

size_t(* MY_CHARSET_HANDLER::lengthsp) (const CHARSET_INFO *, const char *ptr, size_t length)

Given a pointer and a length in bytes, returns a new length in bytes where all trailing space characters are stripped.

This holds even for NO PAD collations.

Exception: The "binary" collation, which is used behind-the-scenes to implement the BINARY type (by mapping it to CHAR(n) COLLATE "binary"), returns just the length back with no stripping. It's done that way so that Field_string (implementing CHAR(n)) returns the full padded width on read (as opposed to a normal CHAR, where we usually strip the spaces on read), but it's suboptimal, since lengthsp() is also used in a number of other places, e.g. stripping trailing spaces from enum values given in by the user. If you call this function, be aware of this special exception and consider the implications.

◆ long10_to_str

size_t(* MY_CHARSET_HANDLER::long10_to_str) (const CHARSET_INFO *, char *to, size_t n, int radix, long int val)

◆ longlong10_to_str

size_t(* MY_CHARSET_HANDLER::longlong10_to_str) (const CHARSET_INFO *, char *to, size_t n, int radix, long long val)

◆ mb_wc

my_charset_conv_mb_wc MY_CHARSET_HANDLER::mb_wc

◆ mbcharlen

unsigned(* MY_CHARSET_HANDLER::mbcharlen) (const CHARSET_INFO *, unsigned c)

◆ numcells

size_t(* MY_CHARSET_HANDLER::numcells) (const CHARSET_INFO *, const char *b, const char *e)

◆ numchars

size_t(* MY_CHARSET_HANDLER::numchars) (const CHARSET_INFO *, const char *b, const char *e)

◆ scan

size_t(* MY_CHARSET_HANDLER::scan) (const CHARSET_INFO *, const char *b, const char *e, int sq)

◆ snprintf

size_t(* MY_CHARSET_HANDLER::snprintf) (const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)

◆ strntod

double(* MY_CHARSET_HANDLER::strntod) (const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)

◆ strntol

long(* MY_CHARSET_HANDLER::strntol) (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)

◆ strntoll

long long(* MY_CHARSET_HANDLER::strntoll) (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)

◆ strntoul

unsigned long(* MY_CHARSET_HANDLER::strntoul) (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)

◆ strntoull

unsigned long long(* MY_CHARSET_HANDLER::strntoull) (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)

◆ strntoull10rnd

unsigned long long(* MY_CHARSET_HANDLER::strntoull10rnd) (const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, const char **endptr, int *error)

◆ strtoll10

long long(* MY_CHARSET_HANDLER::strtoll10) (const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)

◆ wc_mb

my_charset_conv_wc_mb MY_CHARSET_HANDLER::wc_mb

◆ well_formed_len

size_t(* MY_CHARSET_HANDLER::well_formed_len) (const CHARSET_INFO *, const char *b, const char *e, size_t nchars, int *error)

The documentation for this struct was generated from the following file: