MySQL 8.4.2
Source Code Documentation
|
#include <algorithm>
#include <cassert>
#include <cerrno>
#include <climits>
#include <cstdarg>
#include <cstdint>
#include <cstring>
#include <limits>
#include "my_byteorder.h"
#include "my_compiler.h"
#include "my_sys.h"
#include "mysql/strings/dtoa.h"
#include "mysql/strings/int2str.h"
#include "mysql/strings/m_ctype.h"
#include "strings/m_ctype_internals.h"
#include "template_utils.h"
Macros | |
#define | EILSEQ ENOENT |
#define | ULONGLONG_MAX (~(unsigned long long)0) |
#define | MAX_NEGATIVE_NUMBER ((unsigned long long)0x8000000000000000LL) |
#define | INIT_CNT 9 |
#define | LFACTOR 1000000000ULL |
#define | LFACTOR1 10000000000ULL |
#define | LFACTOR2 100000000000ULL |
#define | MY_UTF16_SURROGATE_HIGH_FIRST 0xD800 |
#define | MY_UTF16_SURROGATE_LOW_FIRST 0xDC00 |
#define | MY_UTF16_SURROGATE_LOW_LAST 0xDFFF |
#define | MY_UTF16_HIGH_HEAD(x) ((((uint8_t)(x)) & 0xFC) == 0xD8) |
#define | MY_UTF16_LOW_HEAD(x) ((((uint8_t)(x)) & 0xFC) == 0xDC) |
#define | MY_UTF16_SURROGATE(x) (((x)&0xF800) == 0xD800) |
#define | MY_UTF16_WC2(a, b) ((a << 8) + b) |
#define | MY_UTF16_WC4(a, b, c, d) (((a & 3) << 18) + (b << 10) + ((c & 3) << 8) + d + 0x10000) |
Functions | |
static long long | ulonglong_with_sign (bool negative, unsigned long long ll) |
static int | my_bincmp (const uint8_t *s, const uint8_t *se, const uint8_t *t, const uint8_t *te) |
static size_t | my_caseup_str_mb2_or_mb4 (const CHARSET_INFO *cs, char *s) |
static size_t | my_casedn_str_mb2_or_mb4 (const CHARSET_INFO *cs, char *s) |
static int | my_strcasecmp_mb2_or_mb4 (const CHARSET_INFO *cs, const char *s, const char *t) |
static long | my_strntol_mb2_or_mb4 (const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err) |
static unsigned long | my_strntoul_mb2_or_mb4 (const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err) |
static long long | my_strntoll_mb2_or_mb4 (const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err) |
static unsigned long long | my_strntoull_mb2_or_mb4 (const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err) |
static double | my_strntod_mb2_or_mb4 (const CHARSET_INFO *cs, const char *nptr, size_t length, const char **endptr, int *err) |
static unsigned long long | my_strntoull10rnd_mb2_or_mb4 (const CHARSET_INFO *cs, const char *nptr, size_t length, int unsign_fl, const char **endptr, int *err) |
static size_t | my_l10tostr_mb2_or_mb4 (const CHARSET_INFO *cs, char *dst, size_t len, int radix, long int val) |
static size_t | my_ll10tostr_mb2_or_mb4 (const CHARSET_INFO *cs, char *dst, size_t len, int radix, long long val) |
static long long | my_strtoll10_mb2 (const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error) |
static size_t | my_scan_mb2 (const CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) |
static void | my_fill_mb2 (const CHARSET_INFO *cs, char *s, size_t slen, int fill) |
static size_t | my_vsnprintf_mb2 (char *dst, size_t n, const char *fmt, va_list ap) |
static size_t | my_snprintf_mb2 (const CHARSET_INFO *cs, char *to, size_t n, const char *fmt,...) |
static size_t | my_lengthsp_mb2 (const CHARSET_INFO *cs, const char *ptr, size_t length) |
static int | my_utf16_uni (const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *e) |
static int | my_uni_utf16 (const CHARSET_INFO *cs, my_wc_t wc, uint8_t *s, uint8_t *e) |
static void | my_tolower_utf16 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static void | my_toupper_utf16 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static void | my_tosort_utf16 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static size_t | my_caseup_utf16 (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static void | my_hash_sort_utf16 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, uint64_t *n1, uint64_t *n2) |
static size_t | my_casedn_utf16 (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static int | my_strnncoll_utf16 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
static int | my_strnncollsp_utf16 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen) |
Compare strings, discarding end space. More... | |
static unsigned | my_ismbchar_utf16 (const CHARSET_INFO *cs, const char *b, const char *e) |
static unsigned | my_mbcharlen_utf16 (const CHARSET_INFO *cs, unsigned c) |
static size_t | my_numchars_utf16 (const CHARSET_INFO *cs, const char *b, const char *e) |
static size_t | my_charpos_utf16 (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos) |
static size_t | my_well_formed_len_utf16 (const CHARSET_INFO *cs, const char *b, const char *e, size_t nchars, int *error) |
static int | my_wildcmp_utf16_ci (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 int | my_wildcmp_utf16_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 int | my_strnncoll_utf16_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
static int | my_strnncollsp_utf16_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen) |
static void | my_hash_sort_utf16_bin (const CHARSET_INFO *cs, const uint8_t *pos, size_t len, uint64_t *nr1, uint64_t *nr2) |
static int | my_utf16le_uni (const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *e) |
static int | my_uni_utf16le (const CHARSET_INFO *cs, my_wc_t wc, uint8_t *s, uint8_t *e) |
static size_t | my_lengthsp_utf16le (const CHARSET_INFO *cs, const char *ptr, size_t length) |
static int | my_utf32_uni (const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *e) |
static int | my_uni_utf32 (const CHARSET_INFO *cs, my_wc_t wc, uint8_t *s, uint8_t *e) |
static void | my_tolower_utf32 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static void | my_toupper_utf32 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static void | my_tosort_utf32 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static size_t | my_caseup_utf32 (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static void | my_hash_sort_utf32 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, uint64_t *n1, uint64_t *n2) |
static size_t | my_casedn_utf32 (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static int | my_strnncoll_utf32 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
static int | my_strnncollsp_utf32 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen) |
Compare strings, discarding end space. More... | |
static size_t | my_strnxfrmlen_utf32 (const CHARSET_INFO *cs, size_t len) |
static unsigned | my_ismbchar_utf32 (const CHARSET_INFO *cs, const char *b, const char *e) |
static unsigned | my_mbcharlen_utf32 (const CHARSET_INFO *cs, unsigned c) |
static size_t | my_vsnprintf_utf32 (char *dst, size_t n, const char *fmt, va_list ap) |
static size_t | my_snprintf_utf32 (const CHARSET_INFO *cs, char *to, size_t n, const char *fmt,...) |
static long long | my_strtoll10_utf32 (const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error) |
static size_t | my_numchars_utf32 (const CHARSET_INFO *cs, const char *b, const char *e) |
static size_t | my_charpos_utf32 (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos) |
static size_t | my_well_formed_len_utf32 (const CHARSET_INFO *cs, const char *b, const char *e, size_t nchars, int *error) |
static void | my_fill_utf32 (const CHARSET_INFO *cs, char *s, size_t slen, int fill) |
static size_t | my_lengthsp_utf32 (const CHARSET_INFO *cs, const char *ptr, size_t length) |
static int | my_wildcmp_utf32_ci (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 int | my_wildcmp_utf32_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 int | my_strnncoll_utf32_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
static my_wc_t | my_utf32_get (const uint8_t *s) |
static int | my_strnncollsp_utf32_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen) |
static size_t | my_scan_utf32 (const CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) |
static int | my_ucs2_uni (const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *e) |
static int | my_uni_ucs2 (const CHARSET_INFO *cs, my_wc_t wc, uint8_t *r, uint8_t *e) |
static void | my_tolower_ucs2 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static void | my_toupper_ucs2 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static void | my_tosort_ucs2 (const MY_UNICASE_INFO *uni_plane, my_wc_t *wc) |
static size_t | my_caseup_ucs2 (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static void | my_hash_sort_ucs2 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, uint64_t *n1, uint64_t *n2) |
static size_t | my_casedn_ucs2 (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen) |
static void | my_fill_ucs2 (const CHARSET_INFO *cs, char *s, size_t l, int fill) |
static int | my_strnncoll_ucs2 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
static int | my_strnncollsp_ucs2 (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen) |
static unsigned | my_ismbchar_ucs2 (const CHARSET_INFO *cs, const char *b, const char *e) |
static unsigned | my_mbcharlen_ucs2 (const CHARSET_INFO *cs, unsigned c) |
static size_t | my_numchars_ucs2 (const CHARSET_INFO *cs, const char *b, const char *e) |
static size_t | my_charpos_ucs2 (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos) |
static size_t | my_well_formed_len_ucs2 (const CHARSET_INFO *cs, const char *b, const char *e, size_t nchars, int *error) |
static int | my_wildcmp_ucs2_ci (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 int | my_wildcmp_ucs2_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 int | my_strnncoll_ucs2_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix) |
static int | my_strnncollsp_ucs2_bin (const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen) |
static void | my_hash_sort_ucs2_bin (const CHARSET_INFO *cs, const uint8_t *key, size_t len, uint64_t *nr1, uint64_t *nr2) |
#define EILSEQ ENOENT |
#define INIT_CNT 9 |
#define LFACTOR 1000000000ULL |
#define LFACTOR1 10000000000ULL |
#define LFACTOR2 100000000000ULL |
#define MAX_NEGATIVE_NUMBER ((unsigned long long)0x8000000000000000LL) |
#define MY_UTF16_HIGH_HEAD | ( | x | ) | ((((uint8_t)(x)) & 0xFC) == 0xD8) |
#define MY_UTF16_LOW_HEAD | ( | x | ) | ((((uint8_t)(x)) & 0xFC) == 0xDC) |
#define MY_UTF16_SURROGATE | ( | x | ) | (((x)&0xF800) == 0xD800) |
#define MY_UTF16_SURROGATE_HIGH_FIRST 0xD800 |
#define MY_UTF16_SURROGATE_LOW_FIRST 0xDC00 |
#define MY_UTF16_SURROGATE_LOW_LAST 0xDFFF |
#define MY_UTF16_WC2 | ( | a, | |
b | |||
) | ((a << 8) + b) |
#define MY_UTF16_WC4 | ( | a, | |
b, | |||
c, | |||
d | |||
) | (((a & 3) << 18) + (b << 10) + ((c & 3) << 8) + d + 0x10000) |
#define ULONGLONG_MAX (~(unsigned long long)0) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Compare strings, discarding end space.
If one string is shorter as the other, then we space extend the other so that the strings have equal length.
This will ensure that the following things hold:
"a" == "a " "a\0" < "a" "a\0" < "a "
cs | Character set pinter. |
s | First string to compare. |
slen | Length of 's'. |
t | Second string to compare. |
tlen | Length of 't'. |
IMPLEMENTATION
Negative | number, if a less than b. |
0,if | a is equal to b |
Positive | number, if a > b |
|
static |
|
static |
Compare strings, discarding end space.
If one string is shorter as the other, then we space extend the other so that the strings have equal length.
This will ensure that the following things hold:
"a" == "a " "a\0" < "a" "a\0" < "a "
cs | Character set pinter. |
s | First string to compare. |
slen | Length of 's'. |
t | Second string to compare. |
tlen | Length of 't'. |
IMPLEMENTATION
Negative | number, if a less than b. |
0,if | a is equal to b |
Positive | number, if a > b |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
CHARSET_INFO my_charset_ucs2_bin |
CHARSET_INFO my_charset_ucs2_general_ci |
CHARSET_INFO my_charset_ucs2_general_mysql500_ci |
MY_CHARSET_HANDLER my_charset_ucs2_handler |
CHARSET_INFO my_charset_utf16_bin |
CHARSET_INFO my_charset_utf16_general_ci |
MY_CHARSET_HANDLER my_charset_utf16_handler |
CHARSET_INFO my_charset_utf16le_bin |
CHARSET_INFO my_charset_utf16le_general_ci |
|
static |
CHARSET_INFO my_charset_utf32_bin |
CHARSET_INFO my_charset_utf32_general_ci |
MY_CHARSET_HANDLER my_charset_utf32_handler |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |