MySQL 9.0.0
Source Code Documentation
hp_hash.cc File Reference
#include <inttypes.h>
#include <sys/types.h>
#include <algorithm>
#include <cmath>
#include "my_byteorder.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "mysql/strings/m_ctype.h"
#include "storage/heap/heapdef.h"

Macros

#define FIX_LENGTH(cs, pos, length, char_length)
 

Functions

ha_rows hp_rb_records_in_range (HP_INFO *info, int inx, key_range *min_key, key_range *max_key)
 
ucharhp_search (HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key, uint nextflag)
 
ucharhp_search_next (HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key, HASH_INFO *pos)
 
uint64 hp_mask (uint64 hashnr, uint64 buffmax, uint64 maxlength)
 
void hp_movelink (HASH_INFO *pos, HASH_INFO *next_link, HASH_INFO *newlink)
 
uint64 hp_hashnr (HP_KEYDEF *keydef, const uchar *key)
 
uint64 hp_rec_hashnr (HP_KEYDEF *keydef, const uchar *rec)
 
int hp_rec_key_cmp (HP_KEYDEF *keydef, const uchar *rec1, const uchar *rec2)
 
int hp_key_cmp (HP_KEYDEF *keydef, const uchar *rec, const uchar *key)
 
void hp_make_key (HP_KEYDEF *keydef, uchar *key, const uchar *rec)
 
uint hp_rb_make_key (HP_KEYDEF *keydef, uchar *key, const uchar *rec, uchar *recpos)
 
uint hp_rb_pack_key (const HP_KEYDEF *keydef, uchar *key, const uchar *old, key_part_map keypart_map)
 
uint hp_rb_key_length (HP_KEYDEF *keydef, const uchar *key)
 
uint hp_rb_null_key_length (HP_KEYDEF *keydef, const uchar *key)
 
uint hp_rb_var_key_length (HP_KEYDEF *keydef, const uchar *key)
 
bool hp_if_null_in_key (HP_KEYDEF *keydef, const uchar *record)
 
void heap_update_auto_increment (HP_INFO *info, const uchar *record)
 

Macro Definition Documentation

◆ FIX_LENGTH

#define FIX_LENGTH (   cs,
  pos,
  length,
  char_length 
)
Value:
do { \
if (length > char_length) \
char_length = my_charpos(cs, pos, pos + length, char_length); \
char_length = std::min(char_length, size_t(length)); \
} while (0)
size_t my_charpos(const CHARSET_INFO *cs, const char *beg, const char *end, size_t pos)
Definition: m_ctype.h:656
Definition: commit_order_queue.h:34
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

Function Documentation

◆ heap_update_auto_increment()

void heap_update_auto_increment ( HP_INFO info,
const uchar record 
)

◆ hp_hashnr()

uint64 hp_hashnr ( HP_KEYDEF keydef,
const uchar key 
)

◆ hp_if_null_in_key()

bool hp_if_null_in_key ( HP_KEYDEF keydef,
const uchar record 
)

◆ hp_key_cmp()

int hp_key_cmp ( HP_KEYDEF keydef,
const uchar rec,
const uchar key 
)

◆ hp_make_key()

void hp_make_key ( HP_KEYDEF keydef,
uchar key,
const uchar rec 
)

◆ hp_mask()

uint64 hp_mask ( uint64  hashnr,
uint64  buffmax,
uint64  maxlength 
)

◆ hp_movelink()

void hp_movelink ( HASH_INFO pos,
HASH_INFO next_link,
HASH_INFO newlink 
)

◆ hp_rb_key_length()

uint hp_rb_key_length ( HP_KEYDEF keydef,
const uchar key 
)

◆ hp_rb_make_key()

uint hp_rb_make_key ( HP_KEYDEF keydef,
uchar key,
const uchar rec,
uchar recpos 
)

◆ hp_rb_null_key_length()

uint hp_rb_null_key_length ( HP_KEYDEF keydef,
const uchar key 
)

◆ hp_rb_pack_key()

uint hp_rb_pack_key ( const HP_KEYDEF keydef,
uchar key,
const uchar old,
key_part_map  keypart_map 
)

◆ hp_rb_records_in_range()

ha_rows hp_rb_records_in_range ( HP_INFO info,
int  inx,
key_range min_key,
key_range max_key 
)

◆ hp_rb_var_key_length()

uint hp_rb_var_key_length ( HP_KEYDEF keydef,
const uchar key 
)

◆ hp_rec_hashnr()

uint64 hp_rec_hashnr ( HP_KEYDEF keydef,
const uchar rec 
)

◆ hp_rec_key_cmp()

int hp_rec_key_cmp ( HP_KEYDEF keydef,
const uchar rec1,
const uchar rec2 
)

◆ hp_search()

uchar * hp_search ( HP_INFO info,
HP_KEYDEF keyinfo,
const uchar key,
uint  nextflag 
)

◆ hp_search_next()

uchar * hp_search_next ( HP_INFO info,
HP_KEYDEF keyinfo,
const uchar key,
HASH_INFO pos 
)