MySQL 8.0.40
Source Code Documentation
|
The “binary” pseudo-charset. More...
#include <string.h>
#include <sys/types.h>
#include <algorithm>
#include "m_ctype.h"
#include "m_string.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "template_utils.h"
Macros | |
#define | likeconv(s, A) (A) |
#define | INC_PTR(cs, A, B) (A)++ |
Functions | |
static bool | my_coll_init_8bit_bin (CHARSET_INFO *cs, MY_CHARSET_LOADER *loader) |
static int | my_strnncoll_binary (const CHARSET_INFO *cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, bool t_is_prefix) |
static size_t | my_lengthsp_binary (const CHARSET_INFO *cs, const char *ptr, size_t length) |
static int | my_strnncollsp_binary (const CHARSET_INFO *cs, const uchar *s, size_t slen, const uchar *t, size_t tlen) |
static int | my_strnncoll_8bit_bin (const CHARSET_INFO *cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, bool t_is_prefix) |
static int | my_strnncollsp_8bit_bin (const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length) |
static size_t | my_case_str_bin (const CHARSET_INFO *cs, char *str) |
static size_t | my_case_bin (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static int | my_strcasecmp_bin (const CHARSET_INFO *cs, const char *s, const char *t) |
uint | my_mbcharlen_8bit (const CHARSET_INFO *cs, uint c) |
static int | my_mb_wc_bin (const CHARSET_INFO *cs, my_wc_t *wc, const uchar *str, const uchar *end) |
static int | my_wc_mb_bin (const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e) |
static void | my_hash_sort_8bit_bin (const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2) |
static void | my_hash_sort_bin (const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2) |
static int | my_wildcmp_bin_impl (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 recurse_level) |
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) |
static size_t | my_strnxfrm_8bit_bin_pad_space (const CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) |
static size_t | my_strnxfrm_8bit_bin_no_pad (const CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) |
static uint | my_instr_bin (const CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) |
Variables | |
static const uchar | ctype_bin [] |
static const uchar | bin_char_array [] |
MY_COLLATION_HANDLER | my_collation_8bit_bin_handler |
static MY_COLLATION_HANDLER | my_collation_binary_handler |
static MY_CHARSET_HANDLER | my_charset_handler |
CHARSET_INFO | my_charset_bin |
The “binary” pseudo-charset.
binary is special in that it's not really a character set; conversions from another charset to binary means “erase the charset information” and conversions from binary to another charset means “interpret these bytes as the destination charset”. In other words, in no event are the bytes changed; you can think of binary as the charset equivalent of void * that you can cast through. Needless to say, this also means that using it can be rather dangerous.
#define INC_PTR | ( | cs, | |
A, | |||
B | |||
) | (A)++ |
#define likeconv | ( | s, | |
A | |||
) | (A) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
uint my_mbcharlen_8bit | ( | const CHARSET_INFO * | cs, |
uint | c | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
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 | ||
) |
|
static |
|
static |
|
static |
CHARSET_INFO my_charset_bin |
|
static |
MY_COLLATION_HANDLER my_collation_8bit_bin_handler |
|
static |