88
88
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
89
89
#define MY_CS_READY 256 /* if a charset is initialized */
90
90
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
91
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
92
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
91
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
92
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
93
93
#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
94
94
#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
95
95
#define MY_CHARSET_UNDEFINED 0
149
149
enum my_lex_states
151
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
151
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
152
152
MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
153
153
MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
154
154
MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
155
155
MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
156
MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
157
MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
158
MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
156
MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
157
MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
158
MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
159
159
MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
160
160
MY_LEX_IDENT_OR_KEYWORD,
161
161
MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN,
191
191
int escape,int w_one, int w_many);
193
193
int (*strcasecmp)(const struct charset_info_st * const, const char *, const char *);
195
195
uint32_t (*instr)(const struct charset_info_st * const,
196
196
const char *b, size_t b_length,
197
197
const char *s, size_t s_length,
198
198
my_match_t *match, uint32_t nmatch);
200
200
/* Hash calculation */
201
201
void (*hash_sort)(const struct charset_info_st *cs, const unsigned char *key, size_t len,
202
uint32_t *nr1, uint32_t *nr2);
202
uint32_t *nr1, uint32_t *nr2);
203
203
bool (*propagate)(const struct charset_info_st *cs, const unsigned char *str, size_t len);
204
204
} MY_COLLATION_HANDLER;
232
232
size_t nchars, int *error);
233
233
size_t (*lengthsp)(const struct charset_info_st * const, const char *ptr, size_t length);
234
234
size_t (*numcells)(const struct charset_info_st * const, const char *b, const char *e);
236
236
/* Unicode conversion */
237
237
my_charset_conv_mb_wc mb_wc;
238
238
my_charset_conv_wc_mb wc_mb;
240
240
/* CTYPE scanner */
241
241
int (*ctype)(const struct charset_info_st *cs, int *ctype,
242
242
const unsigned char *s, const unsigned char *e);
244
244
/* Functions for case and sort conversion */
245
245
size_t (*caseup_str)(const struct charset_info_st * const, char *);
246
246
size_t (*casedn_str)(const struct charset_info_st * const, char *);
256
256
int radix, long int val);
257
257
size_t (*int64_t10_to_str)(const struct charset_info_st * const, char *to, size_t n,
258
258
int radix, int64_t val);
260
260
void (*fill)(const struct charset_info_st * const, char *to, size_t len, int fill);
262
262
/* String-to-number conversion routines */
263
263
long (*strntol)(const struct charset_info_st * const, const char *s, size_t l,
264
264
int base, char **e, int *err);
317
317
bool escape_with_backslash_is_dangerous;
318
318
unsigned char levels_for_compare;
319
319
unsigned char levels_for_order;
321
321
MY_CHARSET_HANDLER *cset;
322
322
MY_COLLATION_HANDLER *coll;
326
326
uint32_t strconvert(const CHARSET_INFO *from_cs, const char *from,
364
364
extern void my_hash_sort_simple(const CHARSET_INFO * const cs,
365
365
const unsigned char *key, size_t len,
366
uint32_t *nr1, uint32_t *nr2);
366
uint32_t *nr1, uint32_t *nr2);
368
368
extern size_t my_lengthsp_8bit(const CHARSET_INFO * const cs, const char *ptr, size_t length);
413
413
int64_t my_strtoll10_8bit(const CHARSET_INFO * const cs,
414
414
const char *nptr, char **endptr, int *error);
415
int64_t my_strtoll10_ucs2(CHARSET_INFO *cs,
415
int64_t my_strtoll10_ucs2(CHARSET_INFO *cs,
416
416
const char *nptr, char **endptr, int *error);
418
418
uint64_t my_strntoull10rnd_8bit(const CHARSET_INFO * const cs,
419
419
const char *str, size_t length, int
420
420
unsigned_fl, char **endptr, int *error);
421
uint64_t my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
421
uint64_t my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
422
422
const char *str, size_t length,
423
423
int unsigned_fl, char **endptr, int *error);
576
576
my_strnxfrmlen_utf8mb3(const CHARSET_INFO * const cs, size_t len);
578
578
size_t my_strnxfrm_utf8mb3_bin(const CHARSET_INFO * const cs,
579
unsigned char *dst, size_t dstlen,
579
unsigned char *dst, size_t dstlen,
580
580
uint32_t nweights, const unsigned char *src,
581
581
size_t srclen, uint32_t flags);
649
649
my_mbcharlen_utf8mb3(const CHARSET_INFO * const, uint32_t c);
651
651
unsigned int my_ismbchar_utf8mb4(const CHARSET_INFO * const cs, const char *b, const char *e);
652
652
unsigned int my_mbcharlen_utf8mb4(const CHARSET_INFO * const, uint32_t c);
712
712
const unsigned char *s, size_t slen,
713
713
uint32_t *n1, uint32_t *n2);
715
size_t my_strnxfrm_any_uca(const CHARSET_INFO * const cs,
715
size_t my_strnxfrm_any_uca(const CHARSET_INFO * const cs,
716
716
unsigned char *dst, size_t dstlen, uint32_t nweights,
717
717
const unsigned char *src, size_t srclen,
727
727
const unsigned char *t, size_t tlen,
728
728
bool t_is_prefix);
729
729
int my_strnncollsp_8bit_bin(const CHARSET_INFO * const,
730
const unsigned char *a, size_t a_length,
730
const unsigned char *a, size_t a_length,
731
731
const unsigned char *b, size_t b_length,
732
732
bool diff_if_only_endspace_difference);
733
733
size_t my_case_str_bin(const CHARSET_INFO * const, char *);