164
158
bool (*init)(charset_info_st&, unsigned char *(*alloc)(size_t));
165
159
/* Collation routines */
166
int (*strnncoll)(const charset_info_st*,
167
const unsigned char *, size_t, const unsigned char *, size_t, bool);
168
int (*strnncollsp)(const charset_info_st*,
169
const unsigned char *, size_t, const unsigned char *, size_t,
170
bool diff_if_only_endspace_difference);
171
size_t (*strnxfrm)(const charset_info_st*,
172
unsigned char *dst, size_t dstlen, uint32_t nweights,
173
const unsigned char *src, size_t srclen, uint32_t flags);
174
size_t (*strnxfrmlen)(const charset_info_st*, size_t);
175
bool (*like_range)(const charset_info_st*,
176
const char *s, size_t s_length,
177
char escape, char w_one, char w_many,
179
char *min_str, char *max_str,
180
size_t *min_len, size_t *max_len);
181
int (*wildcmp)(const charset_info_st*,
182
const char *str,const char *str_end,
183
const char *wildstr,const char *wildend,
184
int escape,int w_one, int w_many);
186
int (*strcasecmp)(const charset_info_st*, const char *, const char *);
188
uint32_t (*instr)(const charset_info_st*,
189
const char *b, size_t b_length,
190
const char *s, size_t s_length,
191
my_match_t *match, uint32_t nmatch);
160
int (*strnncoll)(const charset_info_st*, const unsigned char*, size_t, const unsigned char*, size_t, bool);
161
int (*strnncollsp)(const charset_info_st*, const unsigned char*, size_t, const unsigned char*, size_t, bool diff_if_only_endspace_difference);
162
size_t (*strnxfrm)(const charset_info_st*, unsigned char *dst, size_t dstlen, uint32_t nweights, const unsigned char *src, size_t srclen, uint32_t flags);
163
size_t (*strnxfrmlen)(const charset_info_st*, size_t);
164
bool (*like_range)(const charset_info_st*, const char *s, size_t s_length, char escape, char w_one, char w_many,
165
size_t res_length, char *min_str, char *max_str, size_t *min_len, size_t *max_len);
166
int (*wildcmp)(const charset_info_st*, const char *str,const char *str_end, const char *wildstr, const char *wildend, int escape,int w_one, int w_many);
168
int (*strcasecmp)(const charset_info_st*, const char*, const char *);
170
uint32_t (*instr)(const charset_info_st*, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint32_t nmatch);
193
172
/* Hash calculation */
194
void (*hash_sort)(const charset_info_st *cs, const unsigned char *key, size_t len,
195
uint32_t *nr1, uint32_t *nr2);
196
bool (*propagate)(const charset_info_st *cs, const unsigned char *str, size_t len);
173
void (*hash_sort)(const charset_info_st*, const unsigned char *key, size_t len, uint32_t *nr1, uint32_t *nr2);
199
177
/* See strings/charset_info_st.txt about information on this structure */
200
typedef struct my_charset_handler_st
178
struct MY_CHARSET_HANDLER
202
void (*init_unused)();
203
180
/* Multibyte routines */
204
uint32_t (*ismbchar)(const charset_info_st*, const char *, const char *);
205
uint32_t (*mbcharlen)(const charset_info_st*, uint32_t c);
206
size_t (*numchars)(const charset_info_st*, const char *b, const char *e);
207
size_t (*charpos)(const charset_info_st*, const char *b, const char *e, size_t pos);
208
size_t (*well_formed_len)(const charset_info_st&, str_ref, size_t nchars, int *error);
209
size_t (*lengthsp)(const charset_info_st*, const char *ptr, size_t length);
210
size_t (*numcells)(const charset_info_st*, const char *b, const char *e);
181
uint32_t (*ismbchar)(const charset_info_st*, const char*, const char *);
182
uint32_t (*mbcharlen)(const charset_info_st*, uint32_t c);
183
size_t (*numchars)(const charset_info_st*, const char *b, const char *e);
184
size_t (*charpos)(const charset_info_st*, const char *b, const char *e, size_t pos);
185
size_t (*well_formed_len)(const charset_info_st&, str_ref, size_t nchars, int *error);
186
size_t (*lengthsp)(const charset_info_st*, const char *ptr, size_t length);
187
size_t (*numcells)(const charset_info_st*, const char *b, const char *e);
212
189
/* Unicode conversion */
213
190
my_charset_conv_mb_wc mb_wc;
214
191
my_charset_conv_wc_mb wc_mb;
216
193
/* CTYPE scanner */
217
int (*ctype)(const charset_info_st *cs, int *ctype,
218
const unsigned char *s, const unsigned char *e);
194
int (*ctype)(const charset_info_st *cs, int *ctype, const unsigned char *s, const unsigned char *e);
220
196
/* Functions for case and sort conversion */
221
size_t (*caseup_str)(const charset_info_st*, char *);
222
size_t (*casedn_str)(const charset_info_st*, char *);
197
size_t (*caseup_str)(const charset_info_st*, char *);
198
size_t (*casedn_str)(const charset_info_st*, char *);
224
200
my_charset_conv_case caseup;
225
201
my_charset_conv_case casedn;
227
203
/* Charset dependant snprintf() */
228
size_t (*snprintf)(const charset_info_st*, char *to, size_t n,
204
size_t (*snprintf)(const charset_info_st*, char *to, size_t n, const char *fmt, ...)
231
205
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
232
206
__attribute__((format(printf, 4, 5)))
235
size_t (*long10_to_str)(const charset_info_st*, char *to, size_t n,
236
int radix, long int val);
237
size_t (*int64_t10_to_str)(const charset_info_st*, char *to, size_t n,
238
int radix, int64_t val);
209
size_t (*long10_to_str)(const charset_info_st*, char *to, size_t n, int radix, long int val);
210
size_t (*int64_t10_to_str)(const charset_info_st*, char *to, size_t n, int radix, int64_t val);
240
212
void (*fill)(const charset_info_st*, char *to, size_t len, int fill);
242
214
/* String-to-number conversion routines */
243
long (*strntol)(const charset_info_st*, const char *s, size_t l,
244
int base, char **e, int *err);
245
unsigned long (*strntoul)(const charset_info_st*, const char *s, size_t l,
246
int base, char **e, int *err);
247
int64_t (*strntoll)(const charset_info_st*, const char *s, size_t l,
248
int base, char **e, int *err);
249
uint64_t (*strntoull)(const charset_info_st*, const char *s, size_t l,
250
int base, char **e, int *err);
251
double (*strntod)(const charset_info_st*, char *s, size_t l, char **e,
253
int64_t (*strtoll10)(const charset_info_st *cs,
254
const char *nptr, char **endptr, int *error);
255
uint64_t (*strntoull10rnd)(const charset_info_st *cs,
256
const char *str, size_t length,
258
char **endptr, int *error);
259
size_t (*scan)(const charset_info_st*, const char *b, const char *e,
261
} MY_CHARSET_HANDLER;
215
long (*strntol)(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
216
unsigned long (*strntoul)(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
217
int64_t (*strntoll)(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
218
uint64_t (*strntoull)(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
219
double (*strntod)(const charset_info_st*, char *s, size_t l, char **e, int *err);
220
int64_t (*strtoll10)(const charset_info_st*, const char *nptr, char **endptr, int *error);
221
uint64_t (*strntoull10rnd)(const charset_info_st*, const char *str, size_t length, int unsigned_fl, char **endptr, int *error);
222
size_t (*scan)(const charset_info_st*, const char *b, const char *e, int sq);
264
225
/* See strings/charset_info_st.txt about information on this structure */
265
226
struct charset_info_st
291
252
uint16_t min_sort_char;
292
253
uint16_t max_sort_char; /* For LIKE optimization */
293
254
unsigned char pad_char;
294
bool escape_with_backslash_is_dangerous;
295
255
unsigned char levels_for_compare;
296
256
unsigned char levels_for_order;
298
258
MY_CHARSET_HANDLER *cset;
299
259
MY_COLLATION_HANDLER *coll;
261
bool isalpha(unsigned char c) const
263
return (ctype + 1)[c] & (_MY_U | _MY_L);
266
bool isupper(unsigned char c) const
268
return (ctype + 1)[c] & _MY_U;
271
bool islower(unsigned char c) const
273
return (ctype + 1)[c] & _MY_L;
276
bool isdigit(unsigned char c) const
278
return (ctype + 1)[c] & _MY_NMR;
281
bool isxdigit(unsigned char c) const
283
return (ctype + 1)[c] & _MY_X;
286
bool isalnum(unsigned char c) const
288
return (ctype + 1)[c] & (_MY_U | _MY_L | _MY_NMR);
291
bool isspace(unsigned char c) const
293
return (ctype + 1)[c] & _MY_SPC;
296
bool ispunct(unsigned char c) const
298
return (ctype + 1)[c] & _MY_PNT;
301
bool isprint(unsigned char c) const
303
return (ctype + 1)[c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B);
306
bool isgraph(unsigned char c) const
308
return (ctype + 1)[c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR);
311
bool iscntrl(unsigned char c) const
313
return (ctype + 1)[c] & _MY_CTR;
316
bool isvar(char c) const
318
return isalnum(c) || (c) == '_';
321
char toupper(unsigned char c) const
326
char tolower(unsigned char c) const
331
bool binary_compare() const
333
return state & MY_CS_BINSORT;
336
bool use_strnxfrm() const
338
return state & MY_CS_STRNXFRM;
341
size_t strnxfrm(unsigned char *dst, const size_t dstlen, const unsigned char *src, const uint32_t srclen) const
343
return coll->strnxfrm(this, dst, dstlen, dstlen, src, srclen, MY_STRXFRM_PAD_WITH_SPACE);
302
347
extern DRIZZLED_API charset_info_st *all_charsets[256];
303
extern charset_info_st compiled_charsets[];
304
extern uint32_t get_charset_number(const char *cs_name, uint32_t cs_flags);
305
extern uint32_t get_collation_number(const char *name);
306
extern const char *get_charset_name(uint32_t cs_number);
307
extern bool resolve_charset(const char *cs_name,
308
const charset_info_st *default_cs,
309
const charset_info_st **cs);
310
extern bool resolve_collation(const char *cl_name,
311
const charset_info_st *default_cl,
312
const charset_info_st **cl);
313
extern void free_charsets();
314
extern char *get_charsets_dir(char *buf);
315
extern bool my_charset_same(const charset_info_st *cs1, const charset_info_st *cs2);
316
extern size_t escape_string_for_drizzle(const charset_info_st *charset_info,
317
char *to, size_t to_length,
318
const char *from, size_t length);
319
extern size_t escape_quotes_for_drizzle(const charset_info_st *charset_info,
320
char *to, size_t to_length,
321
const char *from, size_t length);
348
uint32_t get_charset_number(const char *cs_name, uint32_t cs_flags);
349
uint32_t get_collation_number(const char *name);
350
const char *get_charset_name(uint32_t cs_number);
351
void free_charsets();
352
bool my_charset_same(const charset_info_st*, const charset_info_st*);
353
size_t escape_string_for_drizzle(const charset_info_st *charset_info, char *to, size_t to_length, const char *from, size_t length);
354
size_t escape_quotes_for_drizzle(const charset_info_st *charset_info, char *to, size_t to_length, const char *from, size_t length);
322
355
extern DRIZZLED_API const charset_info_st *default_charset_info;
323
356
extern DRIZZLED_API const charset_info_st *system_charset_info;
324
357
extern const charset_info_st *files_charset_info;
331
364
extern DRIZZLED_API charset_info_st my_charset_utf8mb4_general_ci;
332
365
extern DRIZZLED_API charset_info_st my_charset_utf8mb4_unicode_ci;
333
366
size_t my_strnxfrmlen_simple(const charset_info_st*, size_t);
334
extern int my_strnncollsp_simple(const charset_info_st*, const unsigned char *, size_t,
335
const unsigned char *, size_t,
336
bool diff_if_only_endspace_difference);
337
extern size_t my_lengthsp_8bit(const charset_info_st* cs, const char *ptr, size_t length);
338
extern uint32_t my_instr_simple(const charset_info_st*,
339
const char *b, size_t b_length,
340
const char *s, size_t s_length,
341
my_match_t *match, uint32_t nmatch);
342
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
343
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
344
extern int my_strcasecmp_mb(const charset_info_st* cs, const char *s, const char *t);
345
extern bool my_parse_charset_xml(const char *bug, size_t len,
346
int (*add)(charset_info_st *cs));
367
int my_strnncollsp_simple(const charset_info_st*, const unsigned char*, size_t, const unsigned char*, size_t, bool diff_if_only_endspace_difference);
368
size_t my_lengthsp_8bit(const charset_info_st*, const char *ptr, size_t length);
369
uint32_t my_instr_simple(const charset_info_st*, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint32_t nmatch);
370
int my_strcasecmp_mb(const charset_info_st*, const char *s, const char *t);
348
372
DRIZZLED_API const charset_info_st *get_charset(uint32_t cs_number);
349
373
DRIZZLED_API const charset_info_st *get_charset_by_name(const char *cs_name);
350
374
DRIZZLED_API const charset_info_st *get_charset_by_csname(const char *cs_name, uint32_t cs_flags);
352
376
/* Functions for 8bit */
353
int my_mb_ctype_8bit(const charset_info_st*,int *, const unsigned char *,const unsigned char *);
354
int my_mb_ctype_mb(const charset_info_st*,int *, const unsigned char *,const unsigned char *);
356
size_t my_scan_8bit(const charset_info_st* cs, const char *b, const char *e, int sq);
358
size_t my_snprintf_8bit(const charset_info_st*, char *to, size_t n,
359
const char *fmt, ...)
360
__attribute__((format(printf, 4, 5)));
362
long my_strntol_8bit(const charset_info_st*, const char *s, size_t l, int base,
364
unsigned long my_strntoul_8bit(const charset_info_st*, const char *s, size_t l, int base,
366
int64_t my_strntoll_8bit(const charset_info_st*, const char *s, size_t l, int base,
368
uint64_t my_strntoull_8bit(const charset_info_st*, const char *s, size_t l, int base,
370
double my_strntod_8bit(const charset_info_st*, char *s, size_t l,char **e,
372
size_t my_long10_to_str_8bit(const charset_info_st*, char *to, size_t l, int radix,
374
size_t my_int64_t10_to_str_8bit(const charset_info_st*, char *to, size_t l, int radix,
376
int64_t my_strtoll10_8bit(const charset_info_st* cs,
377
const char *nptr, char **endptr, int *error);
378
int64_t my_strtoll10_ucs2(charset_info_st *cs,
379
const char *nptr, char **endptr, int *error);
381
uint64_t my_strntoull10rnd_8bit(const charset_info_st* cs,
382
const char *str, size_t length, int
383
unsigned_fl, char **endptr, int *error);
384
uint64_t my_strntoull10rnd_ucs2(charset_info_st *cs,
385
const char *str, size_t length,
386
int unsigned_fl, char **endptr, int *error);
388
void my_fill_8bit(const charset_info_st* cs, char* to, size_t l, int fill);
390
bool my_like_range_simple(const charset_info_st* cs,
377
int my_mb_ctype_8bit(const charset_info_st*, int*, const unsigned char*, const unsigned char *);
378
int my_mb_ctype_mb(const charset_info_st*, int*, const unsigned char*, const unsigned char *);
380
size_t my_scan_8bit(const charset_info_st*, const char *b, const char *e, int sq);
381
size_t my_snprintf_8bit(const charset_info_st*, char *to, size_t n, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
383
long my_strntol_8bit(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
384
unsigned long my_strntoul_8bit(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
385
int64_t my_strntoll_8bit(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
386
uint64_t my_strntoull_8bit(const charset_info_st*, const char *s, size_t l, int base, char **e, int *err);
387
double my_strntod_8bit(const charset_info_st*, char *s, size_t l,char **e, int *err);
388
size_t my_long10_to_str_8bit(const charset_info_st*, char *to, size_t l, int radix, long int val);
389
size_t my_int64_t10_to_str_8bit(const charset_info_st*, char *to, size_t l, int radix, int64_t val);
390
int64_t my_strtoll10_8bit(const charset_info_st*, const char *nptr, char **endptr, int *error);
392
uint64_t my_strntoull10rnd_8bit(const charset_info_st*, const char *str, size_t length, int unsigned_fl, char **endptr, int *error);
394
void my_fill_8bit(const charset_info_st*, char* to, size_t l, int fill);
396
bool my_like_range_simple(const charset_info_st*,
391
397
const char *ptr, size_t ptr_length,
392
398
char escape, char w_one, char w_many,
393
399
size_t res_length,
394
400
char *min_str, char *max_str,
395
401
size_t *min_length, size_t *max_length);
397
bool my_like_range_mb(const charset_info_st* cs,
403
bool my_like_range_mb(const charset_info_st*,
398
404
const char *ptr, size_t ptr_length,
399
405
char escape, char w_one, char w_many,
400
406
size_t res_length,
401
407
char *min_str, char *max_str,
402
408
size_t *min_length, size_t *max_length);
404
bool my_like_range_ucs2(const charset_info_st* cs,
405
const char *ptr, size_t ptr_length,
406
char escape, char w_one, char w_many,
408
char *min_str, char *max_str,
409
size_t *min_length, size_t *max_length);
411
bool my_like_range_utf16(const charset_info_st* cs,
412
const char *ptr, size_t ptr_length,
413
char escape, char w_one, char w_many,
415
char *min_str, char *max_str,
416
size_t *min_length, size_t *max_length);
418
bool my_like_range_utf32(const charset_info_st* cs,
419
const char *ptr, size_t ptr_length,
420
char escape, char w_one, char w_many,
422
char *min_str, char *max_str,
423
size_t *min_length, size_t *max_length);
426
410
int my_wildcmp_8bit(const charset_info_st*,
427
411
const char *str,const char *str_end,
428
412
const char *wildstr,const char *wildend,
515
499
- positive number if s > t
516
500
- 0 is the strings are equal
518
int my_wc_mb_filename(const charset_info_st*,
519
my_wc_t wc, unsigned char *s, unsigned char *e);
521
int my_mb_wc_filename(const charset_info_st*,
522
my_wc_t *pwc, const unsigned char *s, const unsigned char *e);
525
unsigned int my_ismbchar_utf8mb4(const charset_info_st* cs, const char *b, const char *e);
526
unsigned int my_mbcharlen_utf8mb4(const charset_info_st*, uint32_t c);
528
size_t my_strnxfrmlen_utf8mb4(const charset_info_st*, size_t len);
530
my_strnxfrm_utf8mb4(const charset_info_st* cs,
531
unsigned char *dst, size_t dstlen, uint32_t nweights,
532
const unsigned char *src, size_t srclen, uint32_t flags);
534
int my_wildcmp_utf8mb4(const charset_info_st* cs,
535
const char *str, const char *strend,
536
const char *wildstr, const char *wildend,
537
int escape, int w_one, int w_many);
538
int my_strnncollsp_utf8mb4(const charset_info_st* cs,
539
const unsigned char *s, size_t slen,
540
const unsigned char *t, size_t tlen,
541
bool diff_if_only_endspace_difference);
542
int my_strcasecmp_utf8mb4(const charset_info_st* cs,
543
const char *s, const char *t);
545
int my_strnncoll_utf8mb4(const charset_info_st* cs,
546
const unsigned char *s, size_t slen,
547
const unsigned char *t, size_t tlen,
550
int my_mb_wc_utf8mb4(const charset_info_st* cs,
551
my_wc_t * pwc, const unsigned char *s, const unsigned char *e);
553
int my_wc_mb_utf8mb4(const charset_info_st* cs,
554
my_wc_t wc, unsigned char *r, unsigned char *e);
556
size_t my_caseup_str_utf8mb4(const charset_info_st* cs, char *src);
557
size_t my_casedn_str_utf8mb4(const charset_info_st* cs, char *src);
559
size_t my_caseup_utf8mb4(const charset_info_st* cs, char *src, size_t srclen,
560
char *dst, size_t dstlen);
561
size_t my_casedn_utf8mb4(const charset_info_st* cs,
562
char *src, size_t srclen,
563
char *dst, size_t dstlen);
566
int my_strnncoll_any_uca(const charset_info_st* cs,
567
const unsigned char *s, size_t slen,
568
const unsigned char *t, size_t tlen,
571
int my_strnncollsp_any_uca(const charset_info_st* cs,
572
const unsigned char *s, size_t slen,
573
const unsigned char *t, size_t tlen,
574
bool diff_if_only_endspace_difference);
576
void my_hash_sort_any_uca(const charset_info_st* cs,
577
const unsigned char *s, size_t slen,
578
uint32_t *n1, uint32_t *n2);
580
size_t my_strnxfrm_any_uca(const charset_info_st* cs,
581
unsigned char *dst, size_t dstlen, uint32_t nweights,
582
const unsigned char *src, size_t srclen,
585
int my_wildcmp_uca(const charset_info_st* cs,
586
const char *str,const char *str_end,
587
const char *wildstr,const char *wildend,
588
int escape, int w_one, int w_many);
502
int my_wc_mb_filename(const charset_info_st*, my_wc_t wc, unsigned char *s, unsigned char *e);
503
int my_mb_wc_filename(const charset_info_st*, my_wc_t *pwc, const unsigned char *s, const unsigned char *e);
590
505
int my_strnncoll_8bit_bin(const charset_info_st*,
591
506
const unsigned char *s, size_t slen,
623
538
const unsigned char *s, size_t slen,
624
539
const unsigned char *t, size_t tlen,
625
540
bool t_is_prefix);
626
int my_strnncollsp_binary(const charset_info_st* cs,
541
int my_strnncollsp_binary(const charset_info_st*,
627
542
const unsigned char *s, size_t slen,
628
543
const unsigned char *t, size_t tlen,
631
inline static bool my_isascii(char c)
633
return (!(c & ~0177));
636
inline static char my_toascii(char c)
641
inline static char my_tocntrl(char c)
646
inline static char my_toprint(char c)
651
inline static char my_toupper(const charset_info_st *s, unsigned char c)
653
return s->to_upper[c];
656
inline static char my_tolower(const charset_info_st *s, unsigned char c)
658
return s->to_lower[c];
661
inline static bool my_isalpha(const charset_info_st *s, unsigned char c)
663
return (s->ctype+1)[c] & (_MY_U | _MY_L);
666
inline static bool my_isupper(const charset_info_st *s, unsigned char c)
668
return (s->ctype+1)[c] & _MY_U;
671
inline static bool my_islower(const charset_info_st *s, unsigned char c)
673
return (s->ctype+1)[c] & _MY_L;
676
inline static bool my_isdigit(const charset_info_st *s, unsigned char c)
678
return (s->ctype+1)[c] & _MY_NMR;
681
inline static bool my_isxdigit(const charset_info_st *s, unsigned char c)
683
return (s->ctype+1)[c] & _MY_X;
686
inline static bool my_isalnum(const charset_info_st *s, unsigned char c)
688
return (s->ctype+1)[c] & (_MY_U | _MY_L | _MY_NMR);
691
inline static bool my_isspace(const charset_info_st *s, unsigned char c)
693
return (s->ctype+1)[c] & _MY_SPC;
696
inline static bool my_ispunct(const charset_info_st *s, unsigned char c)
698
return (s->ctype+1)[c] & _MY_PNT;
701
inline static bool my_isprint(const charset_info_st *s, unsigned char c)
703
return (s->ctype+1)[c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B);
706
inline static bool my_isgraph(const charset_info_st *s, unsigned char c)
708
return (s->ctype+1)[c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR);
711
inline static bool my_iscntrl(const charset_info_st *s, unsigned char c)
713
return (s->ctype+1)[c] & _MY_CTR;
716
/* Some macros that should be cleaned up a little */
717
inline static bool my_isvar(const charset_info_st *s, char c)
719
return my_isalnum(s,c) || (c) == '_';
722
inline static bool my_isvar_start(const charset_info_st *s, char c)
724
return my_isalpha(s,c) || (c) == '_';
727
inline static bool my_binary_compare(const charset_info_st *s)
729
return s->state & MY_CS_BINSORT;
732
inline static bool use_strnxfrm(const charset_info_st *s)
734
return s->state & MY_CS_STRNXFRM;
737
inline static size_t my_strnxfrm(const charset_info_st *cs,
740
const unsigned char *src,
741
const uint32_t srclen)
743
return (cs->coll->strnxfrm(cs, dst, dstlen, dstlen, src, srclen, MY_STRXFRM_PAD_WITH_SPACE));
746
546
inline static int my_strnncoll(const charset_info_st *cs,
747
547
const unsigned char *s,
748
548
const size_t slen,