47#define HA_MAX_POSSIBLE_KEY 255
53#define HA_MAX_KEY_LENGTH 1000
54#define HA_MAX_KEY_SEG 16
56#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24 + 6 + 6)
57#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH + HA_MAX_KEY_SEG * 6 + 8 + 8)
75 if (**
key != 255)
return *(*key)++;
82 *length_pack = (**
key != 255) ? 1 : 3;
86#define store_key_length_inc(key, length) \
88 if ((length) < 255) { \
89 *(key)++ = (length); \
92 mi_int2store((key) + 1, (length)); \
97#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
99#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
100 (((((uint16)(bit_ptr)[1] << 8) | (uint16)(bit_ptr)[0]) >> (bit_ofs)) & \
101 ((1 << (bit_len)) - 1))
103#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
105 (bit_ptr)[0] = ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
106 ((bits) << (bit_ofs)); \
107 if ((bit_ofs) + (bit_len) > 8) \
109 ((bit_ptr)[1] & ~((1 << ((bit_len)-8 + (bit_ofs))) - 1)) | \
110 ((bits) >> (8 - (bit_ofs))); \
113#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
114 set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
117 const uchar *, uint,
bool);
119 uint key_length, uint nextflag, uint *diff_pos);
131 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:131
int compare_numbers(T val1, T val2)
Compare two numbers of the same type.
Definition: my_compare.h:130
int ha_compare_text(const CHARSET_INFO *, const uchar *, uint, const uchar *, uint, bool)
Definition: my_compare.cc:46
static uint get_key_pack_length(const uchar **key, uint *length_pack)
Definition: my_compare.h:81
static uint get_key_length(const uchar **key)
Definition: my_compare.h:74
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:63
unsigned char uchar
Definition: my_inttypes.h:52
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
Storing of values in high byte first order.
static uint16 mi_uint2korr(const uchar *A)
Definition: myisampack.h:63
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:76
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: m_ctype.h:423
Definition: my_compare.h:60
uint16 length
Definition: my_compare.h:66
uint32 start
Definition: my_compare.h:62
uint8 null_bit
Definition: my_compare.h:69
const CHARSET_INFO * charset
Definition: my_compare.h:61
uint8 bit_length
Definition: my_compare.h:71
uint16 language
Definition: my_compare.h:67
uint8 bit_end
Definition: my_compare.h:70
uint32 null_pos
Definition: my_compare.h:63
uint16 flag
Definition: my_compare.h:65
uint8 type
Definition: my_compare.h:68
uint16 bit_pos
Definition: my_compare.h:64
uint8 bit_start
Definition: my_compare.h:70