23#ifndef M_CTYPE_INCLUDED
24#define M_CTYPE_INCLUDED
42#define MY_CS_NAME_SIZE 32
43#define MY_CS_CTYPE_TABLE_SIZE 257
44#define MY_CS_TO_LOWER_TABLE_SIZE 256
45#define MY_CS_TO_UPPER_TABLE_SIZE 256
46#define MY_CS_SORT_ORDER_TABLE_SIZE 256
47#define MY_CS_TO_UNI_TABLE_SIZE 256
49#define CHARSET_DIR "charsets/"
58#define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
93#define MY_CS_TOOSMALL -101
94#define MY_CS_TOOSMALL2 -102
95#define MY_CS_TOOSMALL3 -103
97#define MY_CS_TOOSMALL4 -104
98#define MY_CS_TOOSMALL5 -105
99#define MY_CS_TOOSMALL6 -106
101#define MY_CS_TOOSMALLN(n) (-100 - (n))
103#define MY_SEQ_INTTAIL 1
104#define MY_SEQ_SPACES 2
108static constexpr uint32_t
110static constexpr uint32_t
112static constexpr uint32_t
114static constexpr uint32_t
116static constexpr uint32_t
118static constexpr uint32_t
120static constexpr uint32_t
122static constexpr uint32_t
128static constexpr uint32_t
130static constexpr uint32_t
132static constexpr uint32_t
134static constexpr uint32_t
136static constexpr uint32_t
138static constexpr uint32_t
140static constexpr uint32_t
142static constexpr uint32_t
144static constexpr uint32_t
149#define MY_REPERTOIRE_ASCII 1
150#define MY_REPERTOIRE_EXTENDED 2
151#define MY_REPERTOIRE_UNICODE30 3
154#define MY_STRXFRM_PAD_TO_MAXLEN 0x00000080
240 uint num_codepoints,
const uchar *src,
size_t srclen,
255 char w_prefix,
char w_one,
char w_many,
size_t res_length,
256 char *min_str,
char *max_str,
size_t *min_len,
259 const char *wildstr,
const char *wildend,
int escape,
260 int w_one,
int w_many);
265 const char *s,
size_t s_length,
my_match_t *match,
314 size_t nchars,
int *
error);
350 ...) MY_ATTRIBUTE((format(printf, 4, 5)));
360 const char **e,
int *
err);
362 const char **e,
int *
err);
364 const char **e,
int *
err);
366 int base,
const char **e,
int *
err);
368 const char **e,
int *
err);
370 const char **endptr,
int *
error);
372 size_t length,
int unsigned_fl,
373 const char **endptr,
int *
error);
426#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
452 size_t dstlen,
uint nweights,
const uchar *src,
456 const uchar *,
size_t,
bool);
459 const uchar *,
size_t);
468 size_t b_length,
const char *s,
size_t s_length,
475 char *dst,
size_t dstlen);
477 char *dst,
size_t dstlen);
493 const char *fmt, ...)
494 MY_ATTRIBUTE((format(printf, 4, 5)));
497 const
char **e,
int *
err);
499 const
char **e,
int *
err);
501 int base, const
char **e,
int *
err);
503 int base, const
char **e,
int *
err);
505 const
char **e,
int *
err);
507 int radix,
long int val);
512 const
char **endptr,
int *
error);
514 char **endptr,
int *
error);
517 size_t length,
int unsigned_fl,
518 const
char **endptr,
int *
error);
520 size_t length,
int unsigned_fl,
char **endptr,
527 size_t ptr_length,
char escape,
char w_one,
528 char w_many,
size_t res_length,
char *min_str,
529 char *max_str,
size_t *min_length,
534 size_t ptr_length,
char escape,
char w_one,
char w_many,
535 size_t res_length,
char *min_str,
char *max_str,
536 size_t *min_length,
size_t *max_length);
540 size_t ptr_length,
char escape,
char w_one,
541 char w_many,
size_t res_length,
char *min_str,
542 char *max_str,
size_t *min_length,
546 const
char *wildstr, const
char *wildend,
int escape,
547 int w_one,
int w_many);
550 const
char *wildstr, const
char *wildend,
int escape,
551 int w_one,
int w_many);
558 const
char *e,
size_t pos,
int *
error);
565 char *dst,
size_t dstlen);
567 char *dst,
size_t dstlen);
569 size_t srclen,
char *dst,
size_t dstlen);
571 size_t srclen,
char *dst,
size_t dstlen);
573 char *dst,
size_t dstlen);
575 char *dst,
size_t dstlen);
579 const
char *wildstr, const
char *wildend,
int escape,
580 int w_one,
int w_many);
586 size_t pos,
int *
error);
588 const
char *s,
size_t s_length,
my_match_t *match,
592 const
uchar *t,
size_t tlen,
bool t_is_prefix);
595 size_t a_length, const
uchar *b,
size_t b_length);
598 const
char *str_end, const
char *wildstr,
599 const
char *wildend,
int escape,
int w_one,
int w_many);
609 uint nweights, const
uchar *src,
size_t srclen,
613 uint nweights, const
uchar *src,
size_t srclen,
617 size_t dstlen,
uint nweights,
618 const
uchar *src,
size_t srclen,
623 const
char *str_end, const
char *wildstr,
624 const
char *wildend,
int escape,
int w_one,
int w_many,
630 const
char *
end, const
char *reject,
631 size_t reject_length);
654 const char *from,
size_t from_length,
660 const char *wildend,
int escape,
int w_many,
677#define my_isascii(c) (!((c) & ~0177))
678#define my_toupper(s, c) (char)((s)->to_upper[(uchar)(c)])
679#define my_tolower(s, c) (char)((s)->to_lower[(uchar)(c)])
680#define my_isalpha(s, c) (((s)->ctype + 1)[(uchar)(c)] & (_MY_U | _MY_L))
681#define my_isupper(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_U)
682#define my_islower(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_L)
683#define my_isdigit(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_NMR)
684#define my_isxdigit(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_X)
685#define my_isalnum(s, c) \
686 (((s)->ctype + 1)[(uchar)(c)] & (_MY_U | _MY_L | _MY_NMR))
687#define my_isspace(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_SPC)
688#define my_ispunct(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_PNT)
689#define my_isprint(s, c) \
690 (((s)->ctype + 1)[(uchar)(c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
691#define my_isgraph(s, c) \
692 (((s)->ctype + 1)[(uchar)(c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
693#define my_iscntrl(s, c) (((s)->ctype + 1)[(uchar)(c)] & _MY_CTR)
696#define my_isvar(s, c) (my_isalnum(s, c) || (c) == '_')
697#define my_isvar_start(s, c) (my_isalpha(s, c) || (c) == '_')
699#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
700#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
701#define my_strnxfrm(cs, d, dl, s, sl) \
702 ((cs)->coll->strnxfrm((cs), (d), (dl), (dl), (s), (sl), 0))
703#define my_strnncoll(s, a, b, c, d) \
704 ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
705#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
706 ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
707#define my_wildcmp(cs, s, se, w, we, e, o, m) \
708 ((cs)->coll->wildcmp((cs), (s), (se), (w), (we), (e), (o), (m)))
709#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b)))
710#define my_charpos(cs, b, e, num) \
711 (cs)->cset->charpos((cs), (const char *)(b), (const char *)(e), (num))
713#define use_mb(s) ((s)->cset->ismbchar != NULL)
721 return cs->cset->ismbchar(
cs, pointer_cast<const char *>(
str),
722 pointer_cast<const char *>(
strend));
725#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s), (a)))
736#define my_mbcharlen_2(s, a, b) \
737 ((s)->cset->mbcharlen((s), ((((a)&0xFF) << 8) + ((b)&0xFF))))
746#define my_mbmaxlenlen(s) ((s)->mbmaxlenlen)
756#define my_ismb1st(s, i) \
757 (my_mbcharlen((s), (i)) > 1 || \
758 (my_mbmaxlenlen((s)) == 2 && my_mbcharlen((s), (i)) == 0))
760#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
761#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
762#define my_strntol(s, a, b, c, d, e) \
763 ((s)->cset->strntol((s), (a), (b), (c), (d), (e)))
764#define my_strntoul(s, a, b, c, d, e) \
765 ((s)->cset->strntoul((s), (a), (b), (c), (d), (e)))
766#define my_strntoll(s, a, b, c, d, e) \
767 ((s)->cset->strntoll((s), (a), (b), (c), (d), (e)))
768#define my_strntoull(s, a, b, c, d, e) \
769 ((s)->cset->strntoull((s), (a), (b), (c), (d), (e)))
770#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s), (a), (b), (c), (d)))
773 return (
cs->mbminlen == 1);
static int flags[50]
Definition: hp_test1.cc:39
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.
Definition: ctype.cc:908
size_t my_caseup_mb_varlen(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:185
static constexpr uint32_t MY_CS_PUREASCII
Definition: m_ctype.h:139
int my_strcasecmp_8bit(const CHARSET_INFO *cs, const char *, const char *)
Definition: ctype-simple.cc:244
struct MY_UNICASE_INFO MY_UNICASE_INFO
size_t my_casedn_str_mb(const CHARSET_INFO *, char *)
Definition: ctype-mb.cc:60
size_t my_charpos_mb3(const CHARSET_INFO *, const char *b, const char *e, size_t pos)
Definition: ctype-mb.cc:330
static uint my_ismbchar(const CHARSET_INFO *cs, const char *str, const char *strend)
Definition: m_ctype.h:714
size_t my_well_formed_len_mb(const CHARSET_INFO *, const char *b, const char *e, size_t pos, int *error)
Definition: ctype-mb.cc:342
double my_strntod_8bit(const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)
Definition: ctype-simple.cc:645
MY_COLLATION_HANDLER my_collation_ucs2_uca_handler
Definition: ctype-uca.cc:5187
CHARSET_INFO my_charset_latin1_bin
Definition: ctype-latin1.cc:670
size_t my_numchars_8bit(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-simple.cc:911
MY_UNICASE_INFO my_unicase_unicode520
Definition: ctype-utf8.cc:4783
size_t my_snprintf_8bit(const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)
Definition: ctype-simple.cc:280
size_t my_strnxfrmlen_simple(const CHARSET_INFO *, size_t)
Definition: ctype-simple.cc:63
struct MY_COLLATION_HANDLER MY_COLLATION_HANDLER
size_t my_strnxfrmlen_unicode_full_bin(const CHARSET_INFO *, size_t)
Definition: ctype-utf8.cc:5170
size_t my_caseup_str_8bit(const CHARSET_INFO *, char *)
Definition: ctype-simple.cc:210
MY_COLLATION_HANDLER my_collation_mb_bin_handler
Definition: ctype-mb.cc:1336
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)
Definition: ctype-mb.cc:409
ulonglong my_strntoull10rnd_8bit(const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, const char **endptr, int *error)
Definition: ctype-simple.cc:1234
int(* my_charset_conv_wc_mb)(const CHARSET_INFO *, my_wc_t, uchar *, uchar *)
Definition: m_ctype.h:292
static constexpr uint32_t MY_CS_READY
Definition: m_ctype.h:131
size_t my_well_formed_len_8bit(const CHARSET_INFO *, const char *b, const char *e, size_t pos, int *error)
Definition: ctype-simple.cc:927
MY_CHARSET_HANDLER my_charset_ascii_handler
Definition: ctype-simple.cc:1555
static bool is_supported_parser_charset(const CHARSET_INFO *cs)
Definition: m_ctype.h:772
static constexpr uint32_t MY_CS_NONASCII
Definition: m_ctype.h:141
MY_UNICASE_INFO my_unicase_turkish
Definition: ctype-utf8.cc:1875
static constexpr uint32_t MY_CS_STRNXFRM
Definition: m_ctype.h:123
ulong my_strntoul_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:396
int my_mb_wc_8bit(const CHARSET_INFO *cs, my_wc_t *wc, const uchar *s, const uchar *e)
Definition: ctype-simple.cc:251
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)
Definition: ctype-simple.cc:841
size_t my_caseup_mb(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:87
CHARSET_INFO my_charset_utf8mb3_bin
Definition: ctype-utf8.cc:5883
void my_fill_8bit(const CHARSET_INFO *cs, char *to, size_t l, int fill)
Definition: ctype-simple.cc:906
size_t my_casedn_mb(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:114
MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler
Definition: ctype-simple.cc:1584
uint my_mbcharlen_8bit(const CHARSET_INFO *, uint c)
Definition: ctype-bin.cc:226
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.
Definition: ctype.cc:966
MY_COLLATION_HANDLER my_collation_8bit_bin_handler
Definition: ctype-bin.cc:453
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1541
static constexpr uint32_t MY_CS_BINSORT
Definition: m_ctype.h:119
MY_UNICASE_INFO my_unicase_mysql500
Definition: ctype-utf8.cc:1701
size_t my_casedn_8bit(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-simple.cc:234
size_t my_caseup_str_mb(const CHARSET_INFO *, char *)
Definition: ctype-mb.cc:43
static constexpr uint32_t MY_CS_LOWER_SORT
Definition: m_ctype.h:145
size_t my_longlong10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l, int radix, longlong val)
Definition: ctype-simple.cc:694
struct MY_CHARSET_HANDLER MY_CHARSET_HANDLER
uint my_strxfrm_flag_normalize(uint flags)
Definition: ctype-simple.cc:1506
static bool my_charset_is_ascii_based(const CHARSET_INFO *cs)
Detect whether a character set is ASCII compatible.
Definition: m_ctype.h:640
int my_mb_ctype_8bit(const CHARSET_INFO *, int *, const uchar *, const uchar *)
Definition: ctype-simple.cc:1143
size_t my_caseup_8bit(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-simple.cc:224
static constexpr uint32_t MY_CS_UNICODE_SUPPLEMENT
Definition: m_ctype.h:143
size_t my_numchars_mb(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-mb.cc:319
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_general_ci
Definition: ctype-utf8.cc:7758
size_t my_strxfrm_pad(const CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags)
Definition: ctype-simple.cc:1511
bool my_charset_is_ascii_compatible(const CHARSET_INFO *cs)
Definition: ctype.cc:822
uint my_string_repertoire(const CHARSET_INFO *cs, const char *str, size_t len)
Definition: ctype.cc:774
int my_strnncoll_simple(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t, bool)
Definition: ctype-simple.cc:136
ulonglong my_strntoull10rnd_ucs2(const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, char **endptr, int *error)
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename
Definition: ctype-utf8.cc:7040
int my_mb_ctype_mb(const CHARSET_INFO *, int *, const uchar *, const uchar *)
Definition: ctype-mb.cc:1323
long my_strntol_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:317
size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr, size_t length)
Definition: ctype-simple.cc:935
size_t(* my_charset_conv_case)(const CHARSET_INFO *, char *, size_t, char *, size_t)
Definition: m_ctype.h:294
bool my_charset_is_8bit_pure_ascii(const CHARSET_INFO *cs)
Definition: ctype.cc:808
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)
Definition: ctype-bin.cc:369
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)
Definition: ctype-mb.cc:361
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)
Definition: ctype-mb.cc:312
static constexpr uint32_t MY_CS_AVAILABLE
Definition: m_ctype.h:133
struct MY_UNI_IDX MY_UNI_IDX
size_t my_casedn_mb_varlen(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:178
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)
Definition: ctype-simple.cc:817
MY_UNICASE_INFO my_unicase_default
Definition: ctype-utf8.cc:1655
CHARSET_INFO my_charset_utf8mb4_bin
Definition: ctype-utf8.cc:7794
struct MY_UNICASE_CHARACTER MY_UNICASE_CHARACTER
MY_CHARSET_HANDLER my_charset_8bit_handler
Definition: ctype-simple.cc:1527
void my_hash_sort_simple(const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
Definition: ctype-simple.cc:290
static constexpr uint32_t MY_CHARSET_UNDEFINED
Definition: m_ctype.h:109
int my_strnncollsp_mb_bin(const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length)
Definition: ctype-mb.cc:439
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)
Definition: ctype-utf8.cc:4926
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...
Definition: ctype.cc:993
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_0900_bin
Definition: ctype-uca.cc:11436
longlong my_strtoll10_8bit(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
Definition: ctype-simple.cc:1138
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_0900_ai_ci
Definition: ctype-uca.cc:9564
static void MY_PUT_MB2(unsigned char *s, uint16 code)
Definition: m_ctype.h:60
static constexpr uint32_t MY_CS_UNICODE
Definition: m_ctype.h:129
struct MY_UNI_CTYPE MY_UNI_CTYPE
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:510
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1
Definition: ctype-latin1.cc:367
ulong my_wc_t
Our own version of wchar_t, ie., a type that holds a single Unicode code point ("wide character").
Definition: m_ctype.h:56
static constexpr uint32_t MY_CS_HIDDEN
Definition: m_ctype.h:137
int my_strcasecmp_mb_bin(const CHARSET_INFO *cs, const char *s, const char *t)
Definition: ctype-mb.cc:560
size_t my_numcells_8bit(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-simple.cc:916
size_t my_long10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l, int radix, long int val)
Definition: ctype-simple.cc:658
uint my_charset_repertoire(const CHARSET_INFO *cs)
Definition: ctype.cc:796
ulonglong my_strntoull_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:548
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.
Definition: ctype-mb.cc:808
MY_UNI_CTYPE my_uni_ctype[256]
Definition: my_uctype.h:934
int my_wc_mb_8bit(const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
Definition: ctype-simple.cc:259
CHARSET_INFO my_charset_utf8mb3_tolower_ci
Definition: ctype-utf8.cc:5813
size_t my_charpos_8bit(const CHARSET_INFO *, const char *b, const char *e, size_t pos)
Definition: ctype-simple.cc:921
static constexpr uint32_t MY_CS_CONFIG_UNUSED
Definition: m_ctype.h:113
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb3_general_ci
Definition: ctype-utf8.cc:5778
void my_hash_sort_mb_bin(const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
Definition: ctype-mb.cc:565
static constexpr uint32_t MY_CS_LOADED
Definition: m_ctype.h:117
static constexpr uint32_t MY_CS_INDEX_UNUSED
Definition: m_ctype.h:115
int my_strcasecmp_mb(const CHARSET_INFO *cs, const char *, const char *)
Definition: ctype-mb.cc:196
size_t my_casedn_str_8bit(const CHARSET_INFO *, char *)
Definition: ctype-simple.cc:217
size_t my_strnxfrm_mb(const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
Definition: ctype-mb.cc:501
int(* my_charset_conv_mb_wc)(const CHARSET_INFO *, my_wc_t *, const uchar *, const uchar *)
Definition: m_ctype.h:290
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)
Definition: ctype-utf8.cc:5125
bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t buflen)
Definition: ctype.cc:744
CHARSET_INFO my_charset_utf32_unicode_ci
Definition: ctype-uca.cc:7790
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)
Definition: ctype-mb.cc:660
int(* my_string_stack_guard)(int)
Definition: ctype.cc:64
MY_CHARSET_HANDLER my_charset_ucs2_handler
Definition: ctype-ucs2.cc:2859
static constexpr uint32_t MY_CS_PRIMARY
Definition: m_ctype.h:121
static constexpr uint32_t MY_CS_COMPILED
Definition: m_ctype.h:111
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 're...
Definition: my_strchr.cc:64
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)
Definition: ctype-simple.cc:942
size_t my_scan_8bit(const CHARSET_INFO *cs, const char *b, const char *e, int sq)
Definition: ctype-simple.cc:884
longlong my_strtoll10_ucs2(const CHARSET_INFO *cs, const char *nptr, char **endptr, int *error)
bool my_propagate_complex(const CHARSET_INFO *cs, const uchar *str, size_t len)
Definition: ctype-simple.cc:1489
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)
Definition: ctype-mb.cc:1041
size_t my_strnxfrm_simple(const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
Definition: ctype-simple.cc:106
longlong my_strntoll_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:469
size_t my_casedn_ujis(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-ujis.cc:35761
size_t my_numcells_mb(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-mb.cc:1291
CHARSET_INFO my_charset_utf8mb3_unicode_ci
Definition: ctype-uca.cc:6085
static constexpr uint32_t MY_CS_CSSORT
Definition: m_ctype.h:135
size_t my_strnxfrm_unicode(const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
Definition: ctype-utf8.cc:5104
Pad_attribute
Definition: m_ctype.h:195
@ NO_PAD
Definition: m_ctype.h:195
@ PAD_SPACE
Definition: m_ctype.h:195
bool my_propagate_simple(const CHARSET_INFO *cs, const uchar *str, size_t len)
Definition: ctype-simple.cc:1483
size_t my_caseup_ujis(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-ujis.cc:35771
int my_strnncollsp_simple(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t)
Definition: ctype-simple.cc:178
static const char * strend(const char *s)
Definition: m_string.h:91
Header for compiler-dependent features.
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
unsigned char uchar
Definition: my_inttypes.h:51
long long int longlong
Definition: my_inttypes.h:54
uint64_t uint64
Definition: my_inttypes.h:68
uint16_t uint16
Definition: my_inttypes.h:64
uint32_t uint32
Definition: my_inttypes.h:66
Definition of the global "loglevel" enumeration.
loglevel
Definition: my_loglevel.h:40
Functions related to handling of plugins and other dynamically loaded libraries.
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:70
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1054
Definition: buf0block_hint.cc:29
Definition: commit_order_queue.h:33
static std::string escape(const std::string &str)
Escapes (only) apostrophes.
Definition: st_units_of_measure.cc:36
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:909
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:191
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Definition: m_ctype.h:382
const uchar * to_lower
Definition: m_ctype.h:393
uchar levels_for_compare
Definition: m_ctype.h:412
const uchar * ident_map
Definition: m_ctype.h:401
uint mbmaxlenlen
Definition: m_ctype.h:407
const struct lex_state_maps_st * state_maps
Definition: m_ctype.h:400
const uchar * ctype
Definition: m_ctype.h:392
uint primary_number
Definition: m_ctype.h:384
const char * csname
Definition: m_ctype.h:387
my_wc_t max_sort_char
Definition: m_ctype.h:409
const MY_UNICASE_INFO * caseinfo
Definition: m_ctype.h:399
bool escape_with_backslash_is_dangerous
Definition: m_ctype.h:411
uint mbminlen
Definition: m_ctype.h:405
uint binary_number
Definition: m_ctype.h:385
uchar caseup_multiply
Definition: m_ctype.h:403
const uchar * sort_order
Definition: m_ctype.h:395
uint mbmaxlen
Definition: m_ctype.h:406
MY_COLLATION_HANDLER * coll
Definition: m_ctype.h:415
MY_CHARSET_HANDLER * cset
Definition: m_ctype.h:414
const char * m_coll_name
Definition: m_ctype.h:388
uint state
Definition: m_ctype.h:386
uchar casedn_multiply
Definition: m_ctype.h:404
const uchar * to_upper
Definition: m_ctype.h:394
const MY_UNI_IDX * tab_from_uni
Definition: m_ctype.h:398
struct Coll_param * coll_param
Definition: m_ctype.h:391
uint number
Definition: m_ctype.h:383
struct MY_UCA_INFO * uca
Definition: m_ctype.h:396
const uint16 * tab_to_uni
Definition: m_ctype.h:397
uchar pad_char
Definition: m_ctype.h:410
my_wc_t min_sort_char
Definition: m_ctype.h:408
enum Pad_attribute pad_attribute
If this collation is PAD_SPACE, it collates as if all inputs were padded with a given number of space...
Definition: m_ctype.h:424
const char * tailoring
Definition: m_ctype.h:390
const char * comment
Definition: m_ctype.h:389
uint strxfrm_multiply
Definition: m_ctype.h:402
Definition: str_uca_type.h:68
Definition: m_ctype.h:298
longlong(* strtoll10)(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
Definition: m_ctype.h:369
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 charact...
Definition: m_ctype.h:330
double(* strntod)(const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)
Definition: m_ctype.h:367
size_t(* well_formed_len)(const CHARSET_INFO *, const char *b, const char *e, size_t nchars, int *error)
Definition: m_ctype.h:313
ulonglong(* strntoull10rnd)(const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, const char **endptr, int *error)
Definition: m_ctype.h:371
size_t(* caseup_str)(const CHARSET_INFO *, char *)
Definition: m_ctype.h:342
uint(* mbcharlen)(const CHARSET_INFO *, uint c)
Definition: m_ctype.h:302
long(* strntol)(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: m_ctype.h:359
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.
Definition: m_ctype.h:311
ulonglong(* strntoull)(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: m_ctype.h:365
ulong(* strntoul)(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: m_ctype.h:361
longlong(* strntoll)(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: m_ctype.h:363
size_t(* numchars)(const CHARSET_INFO *, const char *b, const char *e)
Definition: m_ctype.h:303
size_t(* numcells)(const CHARSET_INFO *, const char *b, const char *e)
Definition: m_ctype.h:331
int(* ctype)(const CHARSET_INFO *cs, int *ctype, const uchar *s, const uchar *e)
Definition: m_ctype.h:338
void(* fill)(const CHARSET_INFO *, char *to, size_t len, int fill)
Definition: m_ctype.h:356
my_charset_conv_wc_mb wc_mb
Definition: m_ctype.h:335
size_t(* scan)(const CHARSET_INFO *, const char *b, const char *e, int sq)
Definition: m_ctype.h:374
bool(* init)(CHARSET_INFO *, MY_CHARSET_LOADER *loader)
Definition: m_ctype.h:299
my_charset_conv_mb_wc mb_wc
Definition: m_ctype.h:334
my_charset_conv_case caseup
Definition: m_ctype.h:345
size_t(* longlong10_to_str)(const CHARSET_INFO *, char *to, size_t n, int radix, longlong val)
Definition: m_ctype.h:353
size_t(* casedn_str)(const CHARSET_INFO *, char *)
Definition: m_ctype.h:343
size_t(* long10_to_str)(const CHARSET_INFO *, char *to, size_t n, int radix, long int val)
Definition: m_ctype.h:351
my_charset_conv_case casedn
Definition: m_ctype.h:346
uint(* ismbchar)(const CHARSET_INFO *, const char *, const char *)
Definition: m_ctype.h:301
size_t(* snprintf)(const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)
Definition: m_ctype.h:349
Definition: m_ctype.h:171
void reporter(enum loglevel, uint, const char *)
Definition: charset.cc:349
virtual void * mem_malloc(size_t)
Definition: charset.cc:339
virtual void * mem_realloc(void *, size_t)
Definition: charset.cc:343
virtual void * once_alloc(size_t)
Definition: charset.cc:335
char errarg[192]
Definition: m_ctype.h:173
virtual void mem_free(void *)
Definition: charset.cc:347
virtual ~MY_CHARSET_LOADER()=default
uint errcode
Definition: m_ctype.h:172
virtual int add_collation(CHARSET_INFO *)
Definition: charset.cc:223
Definition: m_ctype.h:198
int(* strcasecmp)(const CHARSET_INFO *, const char *, const char *)
Definition: m_ctype.h:262
bool(* like_range)(const CHARSET_INFO *, const char *s, size_t s_length, char w_prefix, char w_one, char w_many, size_t res_length, char *min_str, char *max_str, size_t *min_len, size_t *max_len)
Definition: m_ctype.h:254
bool(* init)(CHARSET_INFO *, MY_CHARSET_LOADER *)
Definition: m_ctype.h:199
int(* wildcmp)(const CHARSET_INFO *, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many)
Definition: m_ctype.h:258
void(* uninit)(CHARSET_INFO *)
Definition: m_ctype.h:200
bool(* propagate)(const CHARSET_INFO *cs, const uchar *str, size_t len)
Definition: m_ctype.h:281
void(* hash_sort)(const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
Compute a sort hash for the given key.
Definition: m_ctype.h:279
int(* strnncoll)(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t, bool)
Definition: m_ctype.h:202
int(* strnncollsp)(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t)
Compare the two strings under the pad rules given by the collation.
Definition: m_ctype.h:213
uint(* strstr)(const CHARSET_INFO *, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch)
Definition: m_ctype.h:264
size_t(* strnxfrm)(const CHARSET_INFO *, uchar *dst, size_t dstlen, uint num_codepoints, const uchar *src, size_t srclen, uint flags)
Transform the string into a form such that memcmp() between transformed strings yields the correct co...
Definition: m_ctype.h:239
size_t(* strnxfrmlen)(const CHARSET_INFO *, size_t num_bytes)
Return the maximum number of output bytes needed for strnxfrm() to output all weights for any string ...
Definition: m_ctype.h:253
Definition: str_uca_type.h:119
uint32 sort
Definition: m_ctype.h:68
uint32 tolower
Definition: m_ctype.h:67
uint32 toupper
Definition: m_ctype.h:66
const MY_UNICASE_CHARACTER ** page
Definition: m_ctype.h:73
my_wc_t maxchar
Definition: m_ctype.h:72
uchar * ctype
Definition: m_ctype.h:85
uchar pctype
Definition: m_ctype.h:84
Definition: m_ctype.h:156
const uchar * tab
Definition: m_ctype.h:159
uint16 from
Definition: m_ctype.h:157
uint16 to
Definition: m_ctype.h:158
Definition: sql_chars.h:90
Definition: m_ctype.h:162
uint mb_len
Definition: m_ctype.h:165
uint end
Definition: m_ctype.h:164
uint beg
Definition: m_ctype.h:163
unsigned int uint
Definition: uca9-dump.cc:74
int n
Definition: xcom_base.cc:508