MySQL 8.4.3
Source Code Documentation
|
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include "m_string.h"
#include "my_compiler.h"
#include "mysql/strings/m_ctype.h"
#include "strings/m_ctype_internals.h"
#include "strings/str_uca_type.h"
#include "template_utils.h"
Macros | |
#define | INC_PTR(cs, A, B) A += (my_ismbchar(cs, A, B) ? my_ismbchar(cs, A, B) : 1) |
#define | likeconv(s, A) (uint8_t)(s)->sort_order[(uint8_t)(A)] |
#define | my_strnxfrm_mb_non_ascii_char(cs, dst, src, se) |
Functions | |
size_t | my_caseup_str_mb (const CHARSET_INFO *cs, char *str) |
size_t | my_casedn_str_mb (const CHARSET_INFO *cs, char *str) |
static const MY_UNICASE_CHARACTER * | get_case_info_for_ch (const CHARSET_INFO *cs, unsigned page, unsigned offs) |
size_t | my_caseup_mb (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
size_t | my_casedn_mb (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static size_t | my_casefold_mb_varlen (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen, const uint8_t *map, size_t is_upper) |
size_t | my_casedn_mb_varlen (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
size_t | my_caseup_mb_varlen (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
int | my_strcasecmp_mb (const CHARSET_INFO *cs, const char *s, const char *t) |
static int | my_wildcmp_mb_impl (const CHARSET_INFO *cs, const char *str, const char *str_end, const char *wildstr_arg, const char *wildend_arg, int escape, int w_one, int w_many, int recurse_level) |
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) |
size_t | my_numchars_mb (const CHARSET_INFO *cs, const char *pos, const char *end) |
size_t | my_charpos_mb3 (const CHARSET_INFO *cs, const char *pos, const char *end, size_t length) |
size_t | my_well_formed_len_mb (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error) |
unsigned | 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, unsigned nmatch) |
int | my_strnncoll_mb_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
int | my_strnncollsp_mb_bin (const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length) |
size_t | my_strnxfrm_mb (const CHARSET_INFO *cs, uint8_t *dst, size_t dstlen, unsigned nweights, const uint8_t *src, size_t srclen, unsigned flags) |
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 uint8_t *key, size_t len, uint64_t *nr1, uint64_t *nr2) |
static void | pad_max_char (const CHARSET_INFO *cs, char *str, char *end) |
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... | |
static int | my_wildcmp_mb_bin_impl (const CHARSET_INFO *cs, const char *str, const char *str_end, const char *wildstr_arg, const char *wildend_arg, int escape, int w_one, int w_many, int recurse_level) |
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) |
size_t | my_numcells_mb (const CHARSET_INFO *cs, const char *b, const char *e) |
int | my_mb_ctype_mb (const CHARSET_INFO *cs, int *ctype, const uint8_t *s, const uint8_t *e) |
Variables | |
static const char | pg11 [256] |
static const char | pg23 [256] |
static const char | pg2E [256] |
static const char | pg2F [256] |
static const char | pg30 [256] |
static const char | pg31 [256] |
static const char | pg32 [256] |
static const char | pg4D [256] |
static const char | pg9F [256] |
static const char | pgA4 [256] |
static const char | pgD7 [256] |
static const char | pgFA [256] |
static const char | pgFE [256] |
static const char | pgFF [256] |
struct { | |
int page | |
const char * p | |
} | utr11_data [256] |
MY_COLLATION_HANDLER | my_collation_mb_bin_handler |
#define INC_PTR | ( | cs, | |
A, | |||
B | |||
) | A += (my_ismbchar(cs, A, B) ? my_ismbchar(cs, A, B) : 1) |
#define likeconv | ( | s, | |
A | |||
) | (uint8_t)(s)->sort_order[(uint8_t)(A)] |
#define my_strnxfrm_mb_non_ascii_char | ( | cs, | |
dst, | |||
src, | |||
se | |||
) |
|
inlinestatic |
size_t my_casedn_mb | ( | const CHARSET_INFO * | cs, |
char * | src, | ||
size_t | srclen, | ||
char * | dst, | ||
size_t | dstlen | ||
) |
size_t my_casedn_mb_varlen | ( | const CHARSET_INFO * | cs, |
char * | src, | ||
size_t | srclen, | ||
char * | dst, | ||
size_t | dstlen | ||
) |
size_t my_casedn_str_mb | ( | const CHARSET_INFO * | cs, |
char * | str | ||
) |
|
static |
size_t my_caseup_mb | ( | const CHARSET_INFO * | cs, |
char * | src, | ||
size_t | srclen, | ||
char * | dst, | ||
size_t | dstlen | ||
) |
size_t my_caseup_mb_varlen | ( | const CHARSET_INFO * | cs, |
char * | src, | ||
size_t | srclen, | ||
char * | dst, | ||
size_t | dstlen | ||
) |
size_t my_caseup_str_mb | ( | const CHARSET_INFO * | cs, |
char * | str | ||
) |
size_t my_charpos_mb3 | ( | const CHARSET_INFO * | cs, |
const char * | pos, | ||
const char * | end, | ||
size_t | length | ||
) |
void my_hash_sort_mb_bin | ( | const CHARSET_INFO * | cs, |
const uint8_t * | key, | ||
size_t | len, | ||
uint64_t * | nr1, | ||
uint64_t * | nr2 | ||
) |
unsigned 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, | ||
unsigned | nmatch | ||
) |
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.
cs | Character set and collation pointer | |
ptr | Pointer to LIKE pattern. | |
ptr_length | Length of LIKE pattern. | |
escape | Escape character pattern, typically '\'. | |
w_one | 'One character' pattern, typically '_'. | |
w_many | 'Many characters' pattern, typically ''. | |
res_length | Length of min_str and max_str. | |
[out] | min_str | Smallest string that ranges LIKE. |
[out] | max_str | Largest string that ranges LIKE. |
[out] | min_length | Length of min_str |
[out] | max_length | Length of max_str |
false | if LIKE pattern can be optimized |
true | if LIKE can't be optimized. |
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 | ||
) |
int my_mb_ctype_mb | ( | const CHARSET_INFO * | cs, |
int * | ctype, | ||
const uint8_t * | s, | ||
const uint8_t * | e | ||
) |
size_t my_numcells_mb | ( | const CHARSET_INFO * | cs, |
const char * | b, | ||
const char * | e | ||
) |
size_t my_numchars_mb | ( | const CHARSET_INFO * | cs, |
const char * | pos, | ||
const char * | end | ||
) |
int my_strcasecmp_mb | ( | const CHARSET_INFO * | cs, |
const char * | s, | ||
const char * | t | ||
) |
int my_strcasecmp_mb_bin | ( | const CHARSET_INFO * | cs, |
const char * | s, | ||
const char * | t | ||
) |
int my_strnncoll_mb_bin | ( | const CHARSET_INFO * | cs, |
const uint8_t * | s, | ||
size_t | slen, | ||
const uint8_t * | t, | ||
size_t | tlen, | ||
bool | t_is_prefix | ||
) |
int my_strnncollsp_mb_bin | ( | const CHARSET_INFO * | cs, |
const uint8_t * | a, | ||
size_t | a_length, | ||
const uint8_t * | b, | ||
size_t | b_length | ||
) |
size_t my_strnxfrm_mb | ( | const CHARSET_INFO * | cs, |
uint8_t * | dst, | ||
size_t | dstlen, | ||
unsigned | nweights, | ||
const uint8_t * | src, | ||
size_t | srclen, | ||
unsigned | flags | ||
) |
size_t my_well_formed_len_mb | ( | const CHARSET_INFO * | cs, |
const char * | b, | ||
const char * | e, | ||
size_t | pos, | ||
int * | error | ||
) |
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 | ||
) |
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 | ||
) |
|
static |
|
static |
|
static |
MY_COLLATION_HANDLER my_collation_mb_bin_handler |
const char* p |
int page |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
const struct { ... } utr11_data[256] |