46#define HA_MAX_POSSIBLE_KEY 255
52#define HA_MAX_KEY_LENGTH 1000
53#define HA_MAX_KEY_SEG 16
55#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24 + 6 + 6)
56#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH + HA_MAX_KEY_SEG * 6 + 8 + 8)
74 if (**
key != 255)
return *(*key)++;
81 *length_pack = (**
key != 255) ? 1 : 3;
85#define store_key_length_inc(key, length) \
87 if ((length) < 255) { \
88 *(key)++ = (length); \
91 mi_int2store((key) + 1, (length)); \
96#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
98#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
99 (((((uint16)(bit_ptr)[1] << 8) | (uint16)(bit_ptr)[0]) >> (bit_ofs)) & \
100 ((1 << (bit_len)) - 1))
102#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
104 (bit_ptr)[0] = ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
105 ((bits) << (bit_ofs)); \
106 if ((bit_ofs) + (bit_len) > 8) \
108 ((bit_ptr)[1] & ~((1 << ((bit_len)-8 + (bit_ofs))) - 1)) | \
109 ((bits) >> (8 - (bit_ofs))); \
112#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
113 set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
130 return val1 < val2 ? -1 : (val1 == val2 ? 0 : 1);
A better implementation of the UNIX ctype(3) library.
int ha_key_cmp(const HA_KEYSEG *keyseg, const uchar *a, const uchar *b, uint key_length, uint nextflag, uint *diff_pos)
Definition: my_compare.cc:130
int compare_numbers(T val1, T val2)
Compare two numbers of the same type.
Definition: my_compare.h:129
int ha_compare_text(const CHARSET_INFO *, const uchar *, uint, const uchar *, uint, bool)
Definition: my_compare.cc:45
static uint get_key_pack_length(const uchar **key, uint *length_pack)
Definition: my_compare.h:80
static uint get_key_length(const uchar **key)
Definition: my_compare.h:73
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:62
unsigned char uchar
Definition: my_inttypes.h:51
uint16_t uint16
Definition: my_inttypes.h:64
uint32_t uint32
Definition: my_inttypes.h:66
Storing of values in high byte first order.
static uint16 mi_uint2korr(const uchar *A)
Definition: myisampack.h:62
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Definition: m_ctype.h:382
Definition: my_compare.h:59
uint16 length
Definition: my_compare.h:65
uint32 start
Definition: my_compare.h:61
uint8 null_bit
Definition: my_compare.h:68
const CHARSET_INFO * charset
Definition: my_compare.h:60
uint8 bit_length
Definition: my_compare.h:70
uint16 language
Definition: my_compare.h:66
uint8 bit_end
Definition: my_compare.h:69
uint32 null_pos
Definition: my_compare.h:62
uint16 flag
Definition: my_compare.h:64
uint8 type
Definition: my_compare.h:67
uint16 bit_pos
Definition: my_compare.h:63
uint8 bit_start
Definition: my_compare.h:69
unsigned int uint
Definition: uca9-dump.cc:74