MySQL 8.0.37
Source Code Documentation
m_ctype.h File Reference

A better implementation of the UNIX ctype(3) library. More...

#include <stddef.h>
#include <sys/types.h>
#include <cassert>
#include <cstdint>
#include <cstring>
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_loglevel.h"
#include "my_macros.h"
#include "my_sharedlib.h"
#include "template_utils.h"

Go to the source code of this file.

Classes

struct  MY_UNICASE_CHARACTER
 
struct  MY_UNICASE_INFO
 
struct  MY_UNI_CTYPE
 
struct  MY_UNI_IDX
 
struct  my_match_t
 
struct  MY_CHARSET_LOADER
 
struct  MY_COLLATION_HANDLER
 
struct  MY_CHARSET_HANDLER
 
struct  CHARSET_INFO
 

Macros

#define MY_CS_NAME_SIZE   32
 
#define MY_CS_CTYPE_TABLE_SIZE   257
 
#define MY_CS_TO_LOWER_TABLE_SIZE   256
 
#define MY_CS_TO_UPPER_TABLE_SIZE   256
 
#define MY_CS_SORT_ORDER_TABLE_SIZE   256
 
#define MY_CS_TO_UNI_TABLE_SIZE   256
 
#define CHARSET_DIR   "charsets/"
 
#define MY_CS_REPLACEMENT_CHARACTER   0xFFFD
 
#define MY_CS_ILSEQ   0 /* Wrong by sequence: wb_wc */
 
#define MY_CS_ILUNI   0 /* Cannot encode Unicode to charset: wc_mb */
 
#define MY_CS_TOOSMALL   -101 /* Need at least one byte: wc_mb and mb_wc */
 
#define MY_CS_TOOSMALL2   -102 /* Need at least two bytes: wc_mb and mb_wc */
 
#define MY_CS_TOOSMALL3   -103 /* Need at least three bytes: wc_mb and mb_wc */
 
#define MY_CS_TOOSMALL4   -104 /* Need at least 4 bytes: wc_mb and mb_wc */
 
#define MY_CS_TOOSMALL5   -105 /* Need at least 5 bytes: wc_mb and mb_wc */
 
#define MY_CS_TOOSMALL6   -106 /* Need at least 6 bytes: wc_mb and mb_wc */
 
#define MY_CS_TOOSMALLN(n)   (-100 - (n))
 
#define MY_SEQ_INTTAIL   1
 
#define MY_SEQ_SPACES   2
 
#define MY_REPERTOIRE_ASCII   1 /* Pure ASCII U+0000..U+007F */
 
#define MY_REPERTOIRE_EXTENDED   2 /* Extended characters: U+0080..U+FFFF */
 
#define MY_REPERTOIRE_UNICODE30   3 /* ASCII | EXTENDED: U+0000..U+FFFF */
 
#define MY_STRXFRM_PAD_TO_MAXLEN   0x00000080 /* if pad tail(for filesort) */
 
#define ILLEGAL_CHARSET_INFO_NUMBER   (~0U)
 
#define _MY_U   01 /* Upper case */
 
#define _MY_L   02 /* Lower case */
 
#define _MY_NMR   04 /* Numeral (digit) */
 
#define _MY_SPC   010 /* Spacing character */
 
#define _MY_PNT   020 /* Punctuation */
 
#define _MY_CTR   040 /* Control character */
 
#define _MY_B   0100 /* Blank */
 
#define _MY_X   0200 /* heXadecimal digit */
 
#define my_isascii(c)   (!((c) & ~0177))
 
#define my_toupper(s, c)   (char)((s)->to_upper[(uchar)(c)])
 
#define my_tolower(s, c)   (char)((s)->to_lower[(uchar)(c)])
 
#define my_isalpha(s, c)   (((s)->ctype + 1)[(uchar)(c)] & (_MY_U | _MY_L))
 
#define my_isupper(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_U)
 
#define my_islower(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_L)
 
#define my_isdigit(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_NMR)
 
#define my_isxdigit(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_X)
 
#define my_isalnum(s, c)    (((s)->ctype + 1)[(uchar)(c)] & (_MY_U | _MY_L | _MY_NMR))
 
#define my_isspace(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_SPC)
 
#define my_ispunct(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_PNT)
 
#define my_isprint(s, c)    (((s)->ctype + 1)[(uchar)(c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
 
#define my_isgraph(s, c)    (((s)->ctype + 1)[(uchar)(c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
 
#define my_iscntrl(s, c)   (((s)->ctype + 1)[(uchar)(c)] & _MY_CTR)
 
#define my_isvar(s, c)   (my_isalnum(s, c) || (c) == '_')
 
#define my_isvar_start(s, c)   (my_isalpha(s, c) || (c) == '_')
 
#define my_binary_compare(s)   ((s)->state & MY_CS_BINSORT)
 
#define use_strnxfrm(s)   ((s)->state & MY_CS_STRNXFRM)
 
#define my_strnxfrm(cs, d, dl, s, sl)    ((cs)->coll->strnxfrm((cs), (d), (dl), (dl), (s), (sl), 0))
 
#define my_strnncoll(s, a, b, c, d)    ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
 
#define my_like_range(s, a, b, c, d, e, f, g, h, i, j)    ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
 
#define my_wildcmp(cs, s, se, w, we, e, o, m)    ((cs)->coll->wildcmp((cs), (s), (se), (w), (we), (e), (o), (m)))
 
#define my_strcasecmp(s, a, b)   ((s)->coll->strcasecmp((s), (a), (b)))
 
#define my_charpos(cs, b, e, num)    (cs)->cset->charpos((cs), (const char *)(b), (const char *)(e), (num))
 
#define use_mb(s)   ((s)->cset->ismbchar != NULL)
 
#define my_mbcharlen(s, a)   ((s)->cset->mbcharlen((s), (a)))
 
#define my_mbcharlen_2(s, a, b)    ((s)->cset->mbcharlen((s), ((((a)&0xFF) << 8) + ((b)&0xFF))))
 Get the length of gb18030 code by the given two leading bytes. More...
 
#define my_mbmaxlenlen(s)   ((s)->mbmaxlenlen)
 Get the maximum length of leading bytes needed to determine the length of a multi-byte gb18030 code. More...
 
#define my_ismb1st(s, i)
 Judge if the given byte is a possible leading byte for a charset. More...
 
#define my_caseup_str(s, a)   ((s)->cset->caseup_str((s), (a)))
 
#define my_casedn_str(s, a)   ((s)->cset->casedn_str((s), (a)))
 
#define my_strntol(s, a, b, c, d, e)    ((s)->cset->strntol((s), (a), (b), (c), (d), (e)))
 
#define my_strntoul(s, a, b, c, d, e)    ((s)->cset->strntoul((s), (a), (b), (c), (d), (e)))
 
#define my_strntoll(s, a, b, c, d, e)    ((s)->cset->strntoll((s), (a), (b), (c), (d), (e)))
 
#define my_strntoull(s, a, b, c, d, e)    ((s)->cset->strntoull((s), (a), (b), (c), (d), (e)))
 
#define my_strntod(s, a, b, c, d)   ((s)->cset->strntod((s), (a), (b), (c), (d)))
 

Typedefs

typedef ulong my_wc_t
 Our own version of wchar_t, ie., a type that holds a single Unicode code point ("wide character"). More...
 
typedef struct MY_UNICASE_CHARACTER MY_UNICASE_CHARACTER
 
typedef struct MY_UNICASE_INFO MY_UNICASE_INFO
 
typedef struct MY_UNI_CTYPE MY_UNI_CTYPE
 
typedef struct MY_UNI_IDX MY_UNI_IDX
 
typedef struct MY_COLLATION_HANDLER MY_COLLATION_HANDLER
 
typedef int(* my_charset_conv_mb_wc) (const CHARSET_INFO *, my_wc_t *, const uchar *, const uchar *)
 
typedef int(* my_charset_conv_wc_mb) (const CHARSET_INFO *, my_wc_t, uchar *, uchar *)
 
typedef size_t(* my_charset_conv_case) (const CHARSET_INFO *, char *, size_t, char *, size_t)
 
typedef struct MY_CHARSET_HANDLER MY_CHARSET_HANDLER
 

Enumerations

enum  Pad_attribute { PAD_SPACE , NO_PAD }
 

Functions

static void MY_PUT_MB2 (unsigned char *s, uint16 code)
 
size_t my_strnxfrm_simple (const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
 
size_t my_strnxfrmlen_simple (const CHARSET_INFO *, size_t)
 
int my_strnncoll_simple (const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t, bool)
 
int my_strnncollsp_simple (const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t)
 
void my_hash_sort_simple (const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
 
size_t my_lengthsp_8bit (const CHARSET_INFO *cs, const char *ptr, size_t length)
 
uint my_instr_simple (const CHARSET_INFO *, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch)
 
size_t my_caseup_str_8bit (const CHARSET_INFO *, char *)
 
size_t my_casedn_str_8bit (const CHARSET_INFO *, char *)
 
size_t my_caseup_8bit (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_casedn_8bit (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
int my_strcasecmp_8bit (const CHARSET_INFO *cs, const char *, const char *)
 
int my_mb_wc_8bit (const CHARSET_INFO *cs, my_wc_t *wc, const uchar *s, const uchar *e)
 
int my_wc_mb_8bit (const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
 
int my_mb_ctype_8bit (const CHARSET_INFO *, int *, const uchar *, const uchar *)
 
int my_mb_ctype_mb (const CHARSET_INFO *, int *, const uchar *, const uchar *)
 
size_t my_scan_8bit (const CHARSET_INFO *cs, const char *b, const char *e, int sq)
 
size_t my_snprintf_8bit (const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)
 
long my_strntol_8bit (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
ulong my_strntoul_8bit (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
longlong my_strntoll_8bit (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
ulonglong my_strntoull_8bit (const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
 
double my_strntod_8bit (const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)
 
size_t my_long10_to_str_8bit (const CHARSET_INFO *, char *to, size_t l, int radix, long int val)
 
size_t my_longlong10_to_str_8bit (const CHARSET_INFO *, char *to, size_t l, int radix, longlong val)
 
longlong my_strtoll10_8bit (const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
 
longlong my_strtoll10_ucs2 (const CHARSET_INFO *cs, const char *nptr, char **endptr, int *error)
 
ulonglong my_strntoull10rnd_8bit (const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, const char **endptr, int *error)
 
ulonglong my_strntoull10rnd_ucs2 (const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, char **endptr, int *error)
 
void my_fill_8bit (const CHARSET_INFO *cs, char *to, size_t l, int fill)
 
bool my_like_range_simple (const CHARSET_INFO *cs, const char *ptr, size_t ptr_length, char escape, char w_one, char w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length)
 
bool my_like_range_mb (const CHARSET_INFO *cs, const char *ptr, size_t ptr_length, char escape, char w_one, char w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length)
 
bool my_like_range_generic (const CHARSET_INFO *cs, const char *ptr, size_t ptr_length, char escape, char w_one, char w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length)
 Calculate min_str and max_str that ranges a LIKE string. More...
 
int my_wildcmp_8bit (const CHARSET_INFO *, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many)
 
int my_wildcmp_bin (const CHARSET_INFO *, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many)
 
size_t my_numchars_8bit (const CHARSET_INFO *, const char *b, const char *e)
 
size_t my_numcells_8bit (const CHARSET_INFO *, const char *b, const char *e)
 
size_t my_charpos_8bit (const CHARSET_INFO *, const char *b, const char *e, size_t pos)
 
size_t my_well_formed_len_8bit (const CHARSET_INFO *, const char *b, const char *e, size_t pos, int *error)
 
uint my_mbcharlen_8bit (const CHARSET_INFO *, uint c)
 
size_t my_caseup_str_mb (const CHARSET_INFO *, char *)
 
size_t my_casedn_str_mb (const CHARSET_INFO *, char *)
 
size_t my_caseup_mb (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_casedn_mb (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_caseup_mb_varlen (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_casedn_mb_varlen (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_caseup_ujis (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_casedn_ujis (const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
 
int my_strcasecmp_mb (const CHARSET_INFO *cs, const char *, const char *)
 
int my_wildcmp_mb (const CHARSET_INFO *, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many)
 
size_t my_numchars_mb (const CHARSET_INFO *, const char *b, const char *e)
 
size_t my_numcells_mb (const CHARSET_INFO *, const char *b, const char *e)
 
size_t my_charpos_mb3 (const CHARSET_INFO *, const char *b, const char *e, size_t pos)
 
size_t my_well_formed_len_mb (const CHARSET_INFO *, const char *b, const char *e, size_t pos, int *error)
 
uint my_instr_mb (const CHARSET_INFO *, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch)
 
int my_strnncoll_mb_bin (const CHARSET_INFO *cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, bool t_is_prefix)
 
int my_strnncollsp_mb_bin (const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length)
 
int my_wildcmp_mb_bin (const CHARSET_INFO *cs, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many)
 
int my_strcasecmp_mb_bin (const CHARSET_INFO *cs, const char *s, const char *t)
 
void my_hash_sort_mb_bin (const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
 
size_t my_strnxfrm_mb (const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
 
size_t my_strnxfrm_unicode (const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
 
size_t my_strnxfrm_unicode_full_bin (const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
 
size_t my_strnxfrmlen_unicode_full_bin (const CHARSET_INFO *, size_t)
 
int my_wildcmp_unicode (const CHARSET_INFO *cs, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many, const MY_UNICASE_INFO *weights)
 
bool my_parse_charset_xml (MY_CHARSET_LOADER *loader, const char *buf, size_t buflen)
 
size_t my_strcspn (const CHARSET_INFO *cs, const char *str, const char *end, const char *reject, size_t reject_length)
 Calculate the length of the initial segment of 'str' which consists entirely of characters not in 'reject'. More...
 
bool my_propagate_simple (const CHARSET_INFO *cs, const uchar *str, size_t len)
 
bool my_propagate_complex (const CHARSET_INFO *cs, const uchar *str, size_t len)
 
uint my_string_repertoire (const CHARSET_INFO *cs, const char *str, size_t len)
 
static bool my_charset_is_ascii_based (const CHARSET_INFO *cs)
 Detect whether a character set is ASCII compatible. More...
 
bool my_charset_same (const CHARSET_INFO *cs1, const CHARSET_INFO *cs2)
 
bool my_charset_is_8bit_pure_ascii (const CHARSET_INFO *cs)
 
uint my_charset_repertoire (const CHARSET_INFO *cs)
 
uint my_strxfrm_flag_normalize (uint flags)
 
size_t my_strxfrm_pad (const CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags)
 
bool my_charset_is_ascii_compatible (const CHARSET_INFO *cs)
 
size_t my_convert (char *to, size_t to_length, const CHARSET_INFO *to_cs, const char *from, size_t from_length, const CHARSET_INFO *from_cs, uint *errors)
 Convert a string between two character sets. More...
 
uint my_mbcharlen_ptr (const CHARSET_INFO *cs, const char *s, const char *e)
 Get the length of the first code in given sequence of chars. More...
 
bool my_is_prefixidx_cand (const CHARSET_INFO *cs, const char *wildstr, const char *wildend, int escape, int w_many, size_t *prefix_len)
 Identify whether given like pattern looks like a prefix pattern, which can become candidate for index only scan on prefix indexes. More...
 
static uint my_ismbchar (const CHARSET_INFO *cs, const char *str, const char *strend)
 
static uint my_ismbchar (const CHARSET_INFO *cs, const uchar *str, const uchar *strend)
 
static bool is_supported_parser_charset (const CHARSET_INFO *cs)
 

Variables

MY_UNICASE_INFO my_unicase_default
 
MY_UNICASE_INFO my_unicase_turkish
 
MY_UNICASE_INFO my_unicase_mysql500
 
MY_UNICASE_INFO my_unicase_unicode520
 
MY_UNI_CTYPE my_uni_ctype [256]
 
static constexpr uint32_t MY_CHARSET_UNDEFINED = 0
 
static constexpr uint32_t MY_CS_COMPILED = 1 << 0
 
static constexpr uint32_t MY_CS_CONFIG_UNUSED = 1 << 1
 
static constexpr uint32_t MY_CS_INDEX_UNUSED = 1 << 2
 
static constexpr uint32_t MY_CS_LOADED = 1 << 3
 
static constexpr uint32_t MY_CS_BINSORT = 1 << 4
 
static constexpr uint32_t MY_CS_PRIMARY = 1 << 5
 
static constexpr uint32_t MY_CS_STRNXFRM = 1 << 6
 
static constexpr uint32_t MY_CS_UNICODE = 1 << 7
 
static constexpr uint32_t MY_CS_READY = 1 << 8
 
static constexpr uint32_t MY_CS_AVAILABLE = 1 << 9
 
static constexpr uint32_t MY_CS_CSSORT = 1 << 10
 
static constexpr uint32_t MY_CS_HIDDEN = 1 << 11
 
static constexpr uint32_t MY_CS_PUREASCII = 1 << 12
 
static constexpr uint32_t MY_CS_NONASCII = 1 << 13
 
static constexpr uint32_t MY_CS_UNICODE_SUPPLEMENT = 1 << 14
 
static constexpr uint32_t MY_CS_LOWER_SORT = 1 << 15
 
MYSQL_PLUGIN_IMPORT CHARSET_INFOsystem_charset_info
 
int(* my_string_stack_guard )(int)
 
MY_COLLATION_HANDLER my_collation_mb_bin_handler
 
MY_COLLATION_HANDLER my_collation_8bit_bin_handler
 
MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler
 
MY_COLLATION_HANDLER my_collation_ucs2_uca_handler
 
MY_CHARSET_HANDLER my_charset_8bit_handler
 
MY_CHARSET_HANDLER my_charset_ascii_handler
 
MY_CHARSET_HANDLER my_charset_ucs2_handler
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_0900_ai_ci
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_0900_bin
 
CHARSET_INFO my_charset_latin1_bin
 
CHARSET_INFO my_charset_utf32_unicode_ci
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb3_general_ci
 
CHARSET_INFO my_charset_utf8mb3_tolower_ci
 
CHARSET_INFO my_charset_utf8mb3_unicode_ci
 
CHARSET_INFO my_charset_utf8mb3_bin
 
CHARSET_INFO my_charset_utf8mb4_bin
 
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_general_ci
 

Detailed Description

A better implementation of the UNIX ctype(3) library.

Macro Definition Documentation

◆ _MY_B

#define _MY_B   0100 /* Blank */

◆ _MY_CTR

#define _MY_CTR   040 /* Control character */

◆ _MY_L

#define _MY_L   02 /* Lower case */

◆ _MY_NMR

#define _MY_NMR   04 /* Numeral (digit) */

◆ _MY_PNT

#define _MY_PNT   020 /* Punctuation */

◆ _MY_SPC

#define _MY_SPC   010 /* Spacing character */

◆ _MY_U

#define _MY_U   01 /* Upper case */

◆ _MY_X

#define _MY_X   0200 /* heXadecimal digit */

◆ CHARSET_DIR

#define CHARSET_DIR   "charsets/"

◆ ILLEGAL_CHARSET_INFO_NUMBER

#define ILLEGAL_CHARSET_INFO_NUMBER   (~0U)

◆ my_binary_compare

#define my_binary_compare (   s)    ((s)->state & MY_CS_BINSORT)

◆ my_casedn_str

#define my_casedn_str (   s,
 
)    ((s)->cset->casedn_str((s), (a)))

◆ my_caseup_str

#define my_caseup_str (   s,
 
)    ((s)->cset->caseup_str((s), (a)))

◆ my_charpos

#define my_charpos (   cs,
  b,
  e,
  num 
)     (cs)->cset->charpos((cs), (const char *)(b), (const char *)(e), (num))

◆ MY_CS_CTYPE_TABLE_SIZE

#define MY_CS_CTYPE_TABLE_SIZE   257

◆ MY_CS_ILSEQ

#define MY_CS_ILSEQ   0 /* Wrong by sequence: wb_wc */

◆ MY_CS_ILUNI

#define MY_CS_ILUNI   0 /* Cannot encode Unicode to charset: wc_mb */

◆ MY_CS_NAME_SIZE

#define MY_CS_NAME_SIZE   32

◆ MY_CS_REPLACEMENT_CHARACTER

#define MY_CS_REPLACEMENT_CHARACTER   0xFFFD

◆ MY_CS_SORT_ORDER_TABLE_SIZE

#define MY_CS_SORT_ORDER_TABLE_SIZE   256

◆ MY_CS_TO_LOWER_TABLE_SIZE

#define MY_CS_TO_LOWER_TABLE_SIZE   256

◆ MY_CS_TO_UNI_TABLE_SIZE

#define MY_CS_TO_UNI_TABLE_SIZE   256

◆ MY_CS_TO_UPPER_TABLE_SIZE

#define MY_CS_TO_UPPER_TABLE_SIZE   256

◆ MY_CS_TOOSMALL

#define MY_CS_TOOSMALL   -101 /* Need at least one byte: wc_mb and mb_wc */

◆ MY_CS_TOOSMALL2

#define MY_CS_TOOSMALL2   -102 /* Need at least two bytes: wc_mb and mb_wc */

◆ MY_CS_TOOSMALL3

#define MY_CS_TOOSMALL3   -103 /* Need at least three bytes: wc_mb and mb_wc */

◆ MY_CS_TOOSMALL4

#define MY_CS_TOOSMALL4   -104 /* Need at least 4 bytes: wc_mb and mb_wc */

◆ MY_CS_TOOSMALL5

#define MY_CS_TOOSMALL5   -105 /* Need at least 5 bytes: wc_mb and mb_wc */

◆ MY_CS_TOOSMALL6

#define MY_CS_TOOSMALL6   -106 /* Need at least 6 bytes: wc_mb and mb_wc */

◆ MY_CS_TOOSMALLN

#define MY_CS_TOOSMALLN (   n)    (-100 - (n))

◆ my_isalnum

#define my_isalnum (   s,
 
)     (((s)->ctype + 1)[(uchar)(c)] & (_MY_U | _MY_L | _MY_NMR))

◆ my_isalpha

#define my_isalpha (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & (_MY_U | _MY_L))

◆ my_isascii

#define my_isascii (   c)    (!((c) & ~0177))

◆ my_iscntrl

#define my_iscntrl (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_CTR)

◆ my_isdigit

#define my_isdigit (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_NMR)

◆ my_isgraph

#define my_isgraph (   s,
 
)     (((s)->ctype + 1)[(uchar)(c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))

◆ my_islower

#define my_islower (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_L)

◆ my_ismb1st

#define my_ismb1st (   s,
 
)
Value:
(my_mbcharlen((s), (i)) > 1 || \
(my_mbmaxlenlen((s)) == 2 && my_mbcharlen((s), (i)) == 0))
#define my_mbmaxlenlen(s)
Get the maximum length of leading bytes needed to determine the length of a multi-byte gb18030 code.
Definition: m_ctype.h:755
#define my_mbcharlen(s, a)
Definition: m_ctype.h:734

Judge if the given byte is a possible leading byte for a charset.

For gb18030 whose mbmaxlenlen is 2, we can't determine the length of a multi-byte character by looking at the first byte only

Parameters
[in]scharset_info
[in]ipossible leading byte
Returns
true if it is, otherwise false

◆ my_isprint

#define my_isprint (   s,
 
)     (((s)->ctype + 1)[(uchar)(c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))

◆ my_ispunct

#define my_ispunct (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_PNT)

◆ my_isspace

#define my_isspace (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_SPC)

◆ my_isupper

#define my_isupper (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_U)

◆ my_isvar

#define my_isvar (   s,
 
)    (my_isalnum(s, c) || (c) == '_')

◆ my_isvar_start

#define my_isvar_start (   s,
 
)    (my_isalpha(s, c) || (c) == '_')

◆ my_isxdigit

#define my_isxdigit (   s,
 
)    (((s)->ctype + 1)[(uchar)(c)] & _MY_X)

◆ my_like_range

#define my_like_range (   s,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
 
)     ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))

◆ my_mbcharlen

#define my_mbcharlen (   s,
 
)    ((s)->cset->mbcharlen((s), (a)))

◆ my_mbcharlen_2

#define my_mbcharlen_2 (   s,
  a,
 
)     ((s)->cset->mbcharlen((s), ((((a)&0xFF) << 8) + ((b)&0xFF))))

Get the length of gb18030 code by the given two leading bytes.

Parameters
[in]scharset_info
[in]afirst byte of gb18030 code
[in]bsecond byte of gb18030 code
Returns
the length of gb18030 code starting with given two bytes, the length would be 2 or 4 for valid gb18030 code, or 0 for invalid gb18030 code

◆ my_mbmaxlenlen

#define my_mbmaxlenlen (   s)    ((s)->mbmaxlenlen)

Get the maximum length of leading bytes needed to determine the length of a multi-byte gb18030 code.

Parameters
[in]scharset_info
Returns
number of leading bytes we need, would be 2 for gb18030 and 1 for all other charsets

◆ MY_REPERTOIRE_ASCII

#define MY_REPERTOIRE_ASCII   1 /* Pure ASCII U+0000..U+007F */

◆ MY_REPERTOIRE_EXTENDED

#define MY_REPERTOIRE_EXTENDED   2 /* Extended characters: U+0080..U+FFFF */

◆ MY_REPERTOIRE_UNICODE30

#define MY_REPERTOIRE_UNICODE30   3 /* ASCII | EXTENDED: U+0000..U+FFFF */

◆ MY_SEQ_INTTAIL

#define MY_SEQ_INTTAIL   1

◆ MY_SEQ_SPACES

#define MY_SEQ_SPACES   2

◆ my_strcasecmp

#define my_strcasecmp (   s,
  a,
 
)    ((s)->coll->strcasecmp((s), (a), (b)))

◆ my_strnncoll

#define my_strnncoll (   s,
  a,
  b,
  c,
 
)     ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))

◆ my_strntod

#define my_strntod (   s,
  a,
  b,
  c,
 
)    ((s)->cset->strntod((s), (a), (b), (c), (d)))

◆ my_strntol

#define my_strntol (   s,
  a,
  b,
  c,
  d,
 
)     ((s)->cset->strntol((s), (a), (b), (c), (d), (e)))

◆ my_strntoll

#define my_strntoll (   s,
  a,
  b,
  c,
  d,
 
)     ((s)->cset->strntoll((s), (a), (b), (c), (d), (e)))

◆ my_strntoul

#define my_strntoul (   s,
  a,
  b,
  c,
  d,
 
)     ((s)->cset->strntoul((s), (a), (b), (c), (d), (e)))

◆ my_strntoull

#define my_strntoull (   s,
  a,
  b,
  c,
  d,
 
)     ((s)->cset->strntoull((s), (a), (b), (c), (d), (e)))

◆ my_strnxfrm

#define my_strnxfrm (   cs,
  d,
  dl,
  s,
  sl 
)     ((cs)->coll->strnxfrm((cs), (d), (dl), (dl), (s), (sl), 0))

◆ MY_STRXFRM_PAD_TO_MAXLEN

#define MY_STRXFRM_PAD_TO_MAXLEN   0x00000080 /* if pad tail(for filesort) */

◆ my_tolower

#define my_tolower (   s,
 
)    (char)((s)->to_lower[(uchar)(c)])

◆ my_toupper

#define my_toupper (   s,
 
)    (char)((s)->to_upper[(uchar)(c)])

◆ my_wildcmp

#define my_wildcmp (   cs,
  s,
  se,
  w,
  we,
  e,
  o,
 
)     ((cs)->coll->wildcmp((cs), (s), (se), (w), (we), (e), (o), (m)))

◆ use_mb

#define use_mb (   s)    ((s)->cset->ismbchar != NULL)

◆ use_strnxfrm

#define use_strnxfrm (   s)    ((s)->state & MY_CS_STRNXFRM)

Typedef Documentation

◆ my_charset_conv_case

typedef size_t(* my_charset_conv_case) (const CHARSET_INFO *, char *, size_t, char *, size_t)

◆ my_charset_conv_mb_wc

typedef int(* my_charset_conv_mb_wc) (const CHARSET_INFO *, my_wc_t *, const uchar *, const uchar *)

◆ my_charset_conv_wc_mb

typedef int(* my_charset_conv_wc_mb) (const CHARSET_INFO *, my_wc_t, uchar *, uchar *)

◆ MY_CHARSET_HANDLER

◆ MY_COLLATION_HANDLER

◆ MY_UNI_CTYPE

typedef struct MY_UNI_CTYPE MY_UNI_CTYPE

◆ MY_UNI_IDX

typedef struct MY_UNI_IDX MY_UNI_IDX

◆ MY_UNICASE_CHARACTER

◆ MY_UNICASE_INFO

◆ my_wc_t

typedef ulong my_wc_t

Our own version of wchar_t, ie., a type that holds a single Unicode code point ("wide character").

ulong is always big enough to hold any character in the BMP.

Enumeration Type Documentation

◆ Pad_attribute

Enumerator
PAD_SPACE 
NO_PAD 

Function Documentation

◆ is_supported_parser_charset()

static bool is_supported_parser_charset ( const CHARSET_INFO cs)
inlinestatic

◆ my_casedn_8bit()

size_t my_casedn_8bit ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_casedn_mb()

size_t my_casedn_mb ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_casedn_mb_varlen()

size_t my_casedn_mb_varlen ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_casedn_str_8bit()

size_t my_casedn_str_8bit ( const CHARSET_INFO cs,
char *  str 
)

◆ my_casedn_str_mb()

size_t my_casedn_str_mb ( const CHARSET_INFO cs,
char *  str 
)

◆ my_casedn_ujis()

size_t my_casedn_ujis ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_caseup_8bit()

size_t my_caseup_8bit ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_caseup_mb()

size_t my_caseup_mb ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_caseup_mb_varlen()

size_t my_caseup_mb_varlen ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_caseup_str_8bit()

size_t my_caseup_str_8bit ( const CHARSET_INFO cs,
char *  str 
)

◆ my_caseup_str_mb()

size_t my_caseup_str_mb ( const CHARSET_INFO cs,
char *  str 
)

◆ my_caseup_ujis()

size_t my_caseup_ujis ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_charpos_8bit()

size_t my_charpos_8bit ( const CHARSET_INFO cs,
const char *  b,
const char *  e,
size_t  pos 
)

◆ my_charpos_mb3()

size_t my_charpos_mb3 ( const CHARSET_INFO cs,
const char *  b,
const char *  e,
size_t  pos 
)

◆ my_charset_is_8bit_pure_ascii()

bool my_charset_is_8bit_pure_ascii ( const CHARSET_INFO cs)

◆ my_charset_is_ascii_based()

static bool my_charset_is_ascii_based ( const CHARSET_INFO cs)
inlinestatic

Detect whether a character set is ASCII compatible.

◆ my_charset_is_ascii_compatible()

bool my_charset_is_ascii_compatible ( const CHARSET_INFO cs)

◆ my_charset_repertoire()

uint my_charset_repertoire ( const CHARSET_INFO cs)

◆ my_charset_same()

bool my_charset_same ( const CHARSET_INFO cs1,
const CHARSET_INFO cs2 
)
inline

◆ my_convert()

size_t my_convert ( char *  to,
size_t  to_length,
const CHARSET_INFO to_cs,
const char *  from,
size_t  from_length,
const CHARSET_INFO from_cs,
uint errors 
)

Convert a string between two character sets.

Optimized for quick copying of ASCII characters in the range 0x00..0x7F. 'to' must be large enough to store (form_length * to_cs->mbmaxlen) bytes.

Parameters
[out]toStore result here
to_lengthSize of "to" buffer
to_csCharacter set of result string
fromCopy from here
from_lengthLength of the "from" string
from_csCharacter set of the "from" string
[out]errorsNumber of conversion errors
Returns
Number of bytes copied to 'to' string

◆ my_fill_8bit()

void my_fill_8bit ( const CHARSET_INFO cs,
char *  to,
size_t  l,
int  fill 
)

◆ my_hash_sort_mb_bin()

void my_hash_sort_mb_bin ( const CHARSET_INFO cs,
const uchar key,
size_t  len,
uint64 nr1,
uint64 nr2 
)

◆ my_hash_sort_simple()

void my_hash_sort_simple ( const CHARSET_INFO cs,
const uchar key,
size_t  len,
uint64 nr1,
uint64 nr2 
)

◆ my_instr_mb()

uint my_instr_mb ( const CHARSET_INFO cs,
const char *  b,
size_t  b_length,
const char *  s,
size_t  s_length,
my_match_t match,
uint  nmatch 
)

◆ my_instr_simple()

uint my_instr_simple ( const CHARSET_INFO cs,
const char *  b,
size_t  b_length,
const char *  s,
size_t  s_length,
my_match_t match,
uint  nmatch 
)

◆ my_is_prefixidx_cand()

bool my_is_prefixidx_cand ( const CHARSET_INFO cs,
const char *  wildstr,
const char *  wildend,
int  escape,
int  w_many,
size_t *  prefix_len 
)

Identify whether given like pattern looks like a prefix pattern, which can become candidate for index only scan on prefix indexes.

Parameters
csCharacter set and collation pointer
wildstrPointer to LIKE pattern.
wildendPointer to end of LIKE pattern.
escapeEscape character pattern, typically '\'.
w_many'Many characters' pattern, typically ''.
[out]prefix_lenLength of LIKE pattern.
Returns
Optimization status.
Return values
TRUEif LIKE pattern can be used for prefix index only scan.
FALSEelse.

◆ my_ismbchar() [1/2]

static uint my_ismbchar ( const CHARSET_INFO cs,
const char *  str,
const char *  strend 
)
inlinestatic

◆ my_ismbchar() [2/2]

static uint my_ismbchar ( const CHARSET_INFO cs,
const uchar str,
const uchar strend 
)
inlinestatic

◆ my_lengthsp_8bit()

size_t my_lengthsp_8bit ( const CHARSET_INFO cs,
const char *  ptr,
size_t  length 
)

◆ my_like_range_generic()

bool my_like_range_generic ( const CHARSET_INFO cs,
const char *  ptr,
size_t  ptr_length,
char  escape,
char  w_one,
char  w_many,
size_t  res_length,
char *  min_str,
char *  max_str,
size_t *  min_length,
size_t *  max_length 
)

Calculate min_str and max_str that ranges a LIKE string.

Generic function, currently used for ucs2, utf16, utf32, but should be suitable for any other character sets with cs->min_sort_char and cs->max_sort_char represented in Unicode code points.

Parameters
csCharacter set and collation pointer
ptrPointer to LIKE pattern.
ptr_lengthLength of LIKE pattern.
escapeEscape character pattern, typically '\'.
w_one'One character' pattern, typically '_'.
w_many'Many characters' pattern, typically ''.
res_lengthLength of min_str and max_str.
[out]min_strSmallest string that ranges LIKE.
[out]max_strLargest string that ranges LIKE.
[out]min_lengthLength of min_str
[out]max_lengthLength of max_str
Returns
Optimization status.
Return values
falseif LIKE pattern can be optimized
trueif LIKE can't be optimized.

◆ my_like_range_mb()

bool my_like_range_mb ( const CHARSET_INFO cs,
const char *  ptr,
size_t  ptr_length,
char  escape,
char  w_one,
char  w_many,
size_t  res_length,
char *  min_str,
char *  max_str,
size_t *  min_length,
size_t *  max_length 
)

◆ my_like_range_simple()

bool my_like_range_simple ( const CHARSET_INFO cs,
const char *  ptr,
size_t  ptr_length,
char  escape,
char  w_one,
char  w_many,
size_t  res_length,
char *  min_str,
char *  max_str,
size_t *  min_length,
size_t *  max_length 
)

◆ my_long10_to_str_8bit()

size_t my_long10_to_str_8bit ( const CHARSET_INFO cs,
char *  to,
size_t  l,
int  radix,
long int  val 
)

◆ my_longlong10_to_str_8bit()

size_t my_longlong10_to_str_8bit ( const CHARSET_INFO cs,
char *  to,
size_t  l,
int  radix,
longlong  val 
)

◆ my_mb_ctype_8bit()

int my_mb_ctype_8bit ( const CHARSET_INFO cs,
int *  ctype,
const uchar s,
const uchar e 
)

◆ my_mb_ctype_mb()

int my_mb_ctype_mb ( const CHARSET_INFO cs,
int *  ctype,
const uchar s,
const uchar e 
)

◆ my_mb_wc_8bit()

int my_mb_wc_8bit ( const CHARSET_INFO cs,
my_wc_t wc,
const uchar s,
const uchar e 
)

◆ my_mbcharlen_8bit()

uint my_mbcharlen_8bit ( const CHARSET_INFO cs,
uint  c 
)

◆ my_mbcharlen_ptr()

uint my_mbcharlen_ptr ( const CHARSET_INFO cs,
const char *  s,
const char *  e 
)

Get the length of the first code in given sequence of chars.

This func is introduced because we can't determine the length by checking the first byte only for gb18030, so we first try my_mbcharlen, and then my_mbcharlen_2 if necessary to get the length

Parameters
[in]cscharset_info
[in]sstart of the char sequence
[in]eend of the char sequence
Returns
The length of the first code, or 0 for invalid code

◆ my_numcells_8bit()

size_t my_numcells_8bit ( const CHARSET_INFO cs,
const char *  b,
const char *  e 
)

◆ my_numcells_mb()

size_t my_numcells_mb ( const CHARSET_INFO cs,
const char *  b,
const char *  e 
)

◆ my_numchars_8bit()

size_t my_numchars_8bit ( const CHARSET_INFO cs,
const char *  b,
const char *  e 
)

◆ my_numchars_mb()

size_t my_numchars_mb ( const CHARSET_INFO cs,
const char *  b,
const char *  e 
)

◆ my_parse_charset_xml()

bool my_parse_charset_xml ( MY_CHARSET_LOADER loader,
const char *  buf,
size_t  buflen 
)

◆ my_propagate_complex()

bool my_propagate_complex ( const CHARSET_INFO cs,
const uchar str,
size_t  len 
)

◆ my_propagate_simple()

bool my_propagate_simple ( const CHARSET_INFO cs,
const uchar str,
size_t  len 
)

◆ MY_PUT_MB2()

static void MY_PUT_MB2 ( unsigned char *  s,
uint16  code 
)
inlinestatic

◆ my_scan_8bit()

size_t my_scan_8bit ( const CHARSET_INFO cs,
const char *  b,
const char *  e,
int  sq 
)

◆ my_snprintf_8bit()

size_t my_snprintf_8bit ( const CHARSET_INFO cs,
char *  to,
size_t  n,
const char *  fmt,
  ... 
)

◆ my_strcasecmp_8bit()

int my_strcasecmp_8bit ( const CHARSET_INFO cs,
const char *  s,
const char *  t 
)

◆ my_strcasecmp_mb()

int my_strcasecmp_mb ( const CHARSET_INFO cs,
const char *  s,
const char *  t 
)

◆ my_strcasecmp_mb_bin()

int my_strcasecmp_mb_bin ( const CHARSET_INFO cs,
const char *  s,
const char *  t 
)

◆ my_strcspn()

size_t my_strcspn ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end,
const char *  reject,
size_t  reject_length 
)

Calculate the length of the initial segment of 'str' which consists entirely of characters not in 'reject'.

Parameters
csPointer to charset info.
strPointer to multi-byte string.
str_endPointer to end of multi-byte string.
rejectPointer to start of single-byte reject string.
reject_lengthLength of single-byte reject string.
Returns
Length of segment of multi-byte string that doesn't contain any character of the single-byte reject string or zero if an invalid encoding of a character of the multi-byte string is found.
Note
The reject string points to single-byte characters so it is only possible to find the first occurrence of a single-byte character. Multi-byte characters in 'str' are treated as not matching any character in the reject string. This method returns zero if an invalid encoding of any character in the string 'str' using charset 'cs' is found.

◆ my_string_repertoire()

uint my_string_repertoire ( const CHARSET_INFO cs,
const char *  str,
size_t  len 
)

◆ my_strnncoll_mb_bin()

int my_strnncoll_mb_bin ( const CHARSET_INFO cs,
const uchar s,
size_t  slen,
const uchar t,
size_t  tlen,
bool  t_is_prefix 
)

◆ my_strnncoll_simple()

int my_strnncoll_simple ( const CHARSET_INFO cs,
const uchar s,
size_t  slen,
const uchar t,
size_t  tlen,
bool  t_is_prefix 
)

◆ my_strnncollsp_mb_bin()

int my_strnncollsp_mb_bin ( const CHARSET_INFO cs,
const uchar a,
size_t  a_length,
const uchar b,
size_t  b_length 
)

◆ my_strnncollsp_simple()

int my_strnncollsp_simple ( const CHARSET_INFO cs,
const uchar a,
size_t  a_length,
const uchar b,
size_t  b_length 
)

◆ my_strntod_8bit()

double my_strntod_8bit ( const CHARSET_INFO cs,
const char *  s,
size_t  l,
const char **  e,
int *  err 
)

◆ my_strntol_8bit()

long my_strntol_8bit ( const CHARSET_INFO cs,
const char *  s,
size_t  l,
int  base,
const char **  e,
int *  err 
)

◆ my_strntoll_8bit()

longlong my_strntoll_8bit ( const CHARSET_INFO cs,
const char *  s,
size_t  l,
int  base,
const char **  e,
int *  err 
)

◆ my_strntoul_8bit()

ulong my_strntoul_8bit ( const CHARSET_INFO cs,
const char *  s,
size_t  l,
int  base,
const char **  e,
int *  err 
)

◆ my_strntoull10rnd_8bit()

ulonglong my_strntoull10rnd_8bit ( const CHARSET_INFO cs,
const char *  str,
size_t  length,
int  unsigned_fl,
const char **  endptr,
int *  error 
)

◆ my_strntoull10rnd_ucs2()

ulonglong my_strntoull10rnd_ucs2 ( const CHARSET_INFO cs,
const char *  str,
size_t  length,
int  unsigned_fl,
char **  endptr,
int *  error 
)

◆ my_strntoull_8bit()

ulonglong my_strntoull_8bit ( const CHARSET_INFO cs,
const char *  s,
size_t  l,
int  base,
const char **  e,
int *  err 
)

◆ my_strnxfrm_mb()

size_t my_strnxfrm_mb ( const CHARSET_INFO cs,
uchar dst,
size_t  dstlen,
uint  nweights,
const uchar src,
size_t  srclen,
uint  flags 
)

◆ my_strnxfrm_simple()

size_t my_strnxfrm_simple ( const CHARSET_INFO cs,
uchar dst,
size_t  dstlen,
uint  nweights,
const uchar src,
size_t  srclen,
uint  flags 
)

◆ my_strnxfrm_unicode()

size_t my_strnxfrm_unicode ( const CHARSET_INFO cs,
uchar dst,
size_t  dstlen,
uint  nweights,
const uchar src,
size_t  srclen,
uint  flags 
)

◆ my_strnxfrm_unicode_full_bin()

size_t my_strnxfrm_unicode_full_bin ( const CHARSET_INFO cs,
uchar dst,
size_t  dstlen,
uint  nweights,
const uchar src,
size_t  srclen,
uint  flags 
)

◆ my_strnxfrmlen_simple()

size_t my_strnxfrmlen_simple ( const CHARSET_INFO cs,
size_t  len 
)

◆ my_strnxfrmlen_unicode_full_bin()

size_t my_strnxfrmlen_unicode_full_bin ( const CHARSET_INFO cs,
size_t  len 
)

◆ my_strtoll10_8bit()

longlong my_strtoll10_8bit ( const CHARSET_INFO cs,
const char *  nptr,
const char **  endptr,
int *  error 
)

◆ my_strtoll10_ucs2()

longlong my_strtoll10_ucs2 ( const CHARSET_INFO cs,
const char *  nptr,
char **  endptr,
int *  error 
)

◆ my_strxfrm_flag_normalize()

uint my_strxfrm_flag_normalize ( uint  flags)

◆ my_strxfrm_pad()

size_t my_strxfrm_pad ( const CHARSET_INFO cs,
uchar str,
uchar frmend,
uchar strend,
uint  nweights,
uint  flags 
)

◆ my_wc_mb_8bit()

int my_wc_mb_8bit ( const CHARSET_INFO cs,
my_wc_t  wc,
uchar s,
uchar e 
)

◆ my_well_formed_len_8bit()

size_t my_well_formed_len_8bit ( const CHARSET_INFO cs,
const char *  b,
const char *  e,
size_t  pos,
int *  error 
)

◆ my_well_formed_len_mb()

size_t my_well_formed_len_mb ( const CHARSET_INFO cs,
const char *  b,
const char *  e,
size_t  pos,
int *  error 
)

◆ my_wildcmp_8bit()

int my_wildcmp_8bit ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end,
const char *  wildstr,
const char *  wildend,
int  escape,
int  w_one,
int  w_many 
)

◆ my_wildcmp_bin()

int my_wildcmp_bin ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end,
const char *  wildstr,
const char *  wildend,
int  escape,
int  w_one,
int  w_many 
)

◆ my_wildcmp_mb()

int my_wildcmp_mb ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end,
const char *  wildstr,
const char *  wildend,
int  escape,
int  w_one,
int  w_many 
)

◆ my_wildcmp_mb_bin()

int my_wildcmp_mb_bin ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end,
const char *  wildstr,
const char *  wildend,
int  escape,
int  w_one,
int  w_many 
)

◆ my_wildcmp_unicode()

int my_wildcmp_unicode ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end,
const char *  wildstr,
const char *  wildend,
int  escape,
int  w_one,
int  w_many,
const MY_UNICASE_INFO weights 
)

Variable Documentation

◆ my_charset_8bit_handler

MY_CHARSET_HANDLER my_charset_8bit_handler
extern

◆ my_charset_ascii_handler

MY_CHARSET_HANDLER my_charset_ascii_handler
extern

◆ my_charset_bin

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
extern

◆ my_charset_filename

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename
extern

◆ my_charset_latin1

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1
extern

◆ my_charset_latin1_bin

CHARSET_INFO my_charset_latin1_bin
extern

◆ my_charset_ucs2_handler

MY_CHARSET_HANDLER my_charset_ucs2_handler
extern

◆ MY_CHARSET_UNDEFINED

constexpr uint32_t MY_CHARSET_UNDEFINED = 0
staticconstexpr

◆ my_charset_utf32_unicode_ci

CHARSET_INFO my_charset_utf32_unicode_ci
extern

◆ my_charset_utf8mb3_bin

CHARSET_INFO my_charset_utf8mb3_bin
extern

◆ my_charset_utf8mb3_general_ci

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb3_general_ci
extern

◆ my_charset_utf8mb3_tolower_ci

CHARSET_INFO my_charset_utf8mb3_tolower_ci
extern

◆ my_charset_utf8mb3_unicode_ci

CHARSET_INFO my_charset_utf8mb3_unicode_ci
extern

◆ my_charset_utf8mb4_0900_ai_ci

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_0900_ai_ci
extern

◆ my_charset_utf8mb4_0900_bin

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_0900_bin
extern

◆ my_charset_utf8mb4_bin

CHARSET_INFO my_charset_utf8mb4_bin
extern

◆ my_charset_utf8mb4_general_ci

MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_general_ci
extern

◆ my_collation_8bit_bin_handler

MY_COLLATION_HANDLER my_collation_8bit_bin_handler
extern

◆ my_collation_8bit_simple_ci_handler

MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler
extern

◆ my_collation_mb_bin_handler

MY_COLLATION_HANDLER my_collation_mb_bin_handler
extern

◆ my_collation_ucs2_uca_handler

MY_COLLATION_HANDLER my_collation_ucs2_uca_handler
extern

◆ MY_CS_AVAILABLE

constexpr uint32_t MY_CS_AVAILABLE = 1 << 9
staticconstexpr

◆ MY_CS_BINSORT

constexpr uint32_t MY_CS_BINSORT = 1 << 4
staticconstexpr

◆ MY_CS_COMPILED

constexpr uint32_t MY_CS_COMPILED = 1 << 0
staticconstexpr

◆ MY_CS_CONFIG_UNUSED

constexpr uint32_t MY_CS_CONFIG_UNUSED = 1 << 1
staticconstexpr

◆ MY_CS_CSSORT

constexpr uint32_t MY_CS_CSSORT = 1 << 10
staticconstexpr

◆ MY_CS_HIDDEN

constexpr uint32_t MY_CS_HIDDEN = 1 << 11
staticconstexpr

◆ MY_CS_INDEX_UNUSED

constexpr uint32_t MY_CS_INDEX_UNUSED = 1 << 2
staticconstexpr

◆ MY_CS_LOADED

constexpr uint32_t MY_CS_LOADED = 1 << 3
staticconstexpr

◆ MY_CS_LOWER_SORT

constexpr uint32_t MY_CS_LOWER_SORT = 1 << 15
staticconstexpr

◆ MY_CS_NONASCII

constexpr uint32_t MY_CS_NONASCII = 1 << 13
staticconstexpr

◆ MY_CS_PRIMARY

constexpr uint32_t MY_CS_PRIMARY = 1 << 5
staticconstexpr

◆ MY_CS_PUREASCII

constexpr uint32_t MY_CS_PUREASCII = 1 << 12
staticconstexpr

◆ MY_CS_READY

constexpr uint32_t MY_CS_READY = 1 << 8
staticconstexpr

◆ MY_CS_STRNXFRM

constexpr uint32_t MY_CS_STRNXFRM = 1 << 6
staticconstexpr

◆ MY_CS_UNICODE

constexpr uint32_t MY_CS_UNICODE = 1 << 7
staticconstexpr

◆ MY_CS_UNICODE_SUPPLEMENT

constexpr uint32_t MY_CS_UNICODE_SUPPLEMENT = 1 << 14
staticconstexpr

◆ my_string_stack_guard

int(* my_string_stack_guard) (int) ( int  )
extern

◆ my_uni_ctype

MY_UNI_CTYPE my_uni_ctype[256]
extern

◆ my_unicase_default

MY_UNICASE_INFO my_unicase_default
extern

◆ my_unicase_mysql500

MY_UNICASE_INFO my_unicase_mysql500
extern

◆ my_unicase_turkish

MY_UNICASE_INFO my_unicase_turkish
extern

◆ my_unicase_unicode520

MY_UNICASE_INFO my_unicase_unicode520
extern

◆ system_charset_info

MYSQL_PLUGIN_IMPORT CHARSET_INFO* system_charset_info
extern