MySQL 8.4.2
Source Code Documentation
mi_search.cc File Reference
#include "my_config.h"
#include <stdlib.h>
#include <sys/types.h>
#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/myisam/fulltext.h"
#include "storage/myisam/myisamdef.h"

Macros

#define store_pack_length(test, pos, length)
 

Functions

static bool _mi_get_prev_key (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length)
 
int _mi_check_index (MI_INFO *info, int inx)
 
int _mi_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_len, uint nextflag, my_off_t pos)
 
int _mi_bin_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, bool *last_key)
 
int _mi_seq_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, bool *last_key)
 
int _mi_prefix_search (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint nextflag, uchar **ret_pos, uchar *buff, bool *last_key)
 
my_off_t _mi_kpos (uint nod_flag, uchar *after_key)
 
void _mi_kpointer (MI_INFO *info, uchar *buff, my_off_t pos)
 
my_off_t _mi_dpos (MI_INFO *info, uint nod_flag, const uchar *after_key)
 
my_off_t _mi_rec_pos (MYISAM_SHARE *s, uchar *ptr)
 
void _mi_dpointer (MI_INFO *info, uchar *buff, my_off_t pos)
 
uint _mi_get_static_key (MI_KEYDEF *keyinfo, uint nod_flag, uchar **page, uchar *key)
 
uint _mi_get_pack_key (MI_KEYDEF *keyinfo, uint nod_flag, uchar **page_pos, uchar *key)
 
uint _mi_get_binary_pack_key (MI_KEYDEF *keyinfo, uint nod_flag, uchar **page_pos, uchar *key)
 
uchar_mi_get_key (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length)
 
uchar_mi_get_last_key (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *lastkey, uchar *endpos, uint *return_key_length)
 
uint _mi_keylength (MI_KEYDEF *keyinfo, const uchar *key)
 
uint _mi_keylength_part (MI_KEYDEF *keyinfo, const uchar *key, HA_KEYSEG *end)
 
uchar_mi_move_key (MI_KEYDEF *keyinfo, uchar *to, const uchar *from)
 
int _mi_search_next (MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uint nextflag, my_off_t pos)
 
int _mi_search_first (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos)
 
int _mi_search_last (MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t pos)
 
int _mi_calc_static_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *next_pos, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
 
int _mi_calc_var_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *next_pos, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
 
int _mi_calc_var_pack_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *next_key, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
 
int _mi_calc_bin_pack_key_length (MI_KEYDEF *keyinfo, uint nod_flag, const uchar *next_key, uchar *org_key, uchar *prev_key, const uchar *key, MI_KEY_PARAM *s_temp)
 
void _mi_store_static_key (MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp)
 
void _mi_store_var_pack_key (MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp)
 
void _mi_store_bin_pack_key (MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp)
 

Macro Definition Documentation

◆ store_pack_length

#define store_pack_length (   test,
  pos,
  length 
)
Value:
{ \
if (test) { \
*((pos)++) = (uchar)(length); \
} else { \
*((pos)++) = (uchar)((length) >> 8); \
*((pos)++) = (uchar)(length); \
} \
}
unsigned char uchar
Definition: my_inttypes.h:52
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

◆ _mi_bin_search()

int _mi_bin_search ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uint  key_len,
uint  comp_flag,
uchar **  ret_pos,
uchar buff,
bool *  last_key 
)

◆ _mi_calc_bin_pack_key_length()

int _mi_calc_bin_pack_key_length ( MI_KEYDEF keyinfo,
uint  nod_flag,
const uchar next_key,
uchar org_key,
uchar prev_key,
const uchar key,
MI_KEY_PARAM s_temp 
)

◆ _mi_calc_static_key_length()

int _mi_calc_static_key_length ( MI_KEYDEF keyinfo,
uint  nod_flag,
const uchar next_pos,
uchar org_key,
uchar prev_key,
const uchar key,
MI_KEY_PARAM s_temp 
)

◆ _mi_calc_var_key_length()

int _mi_calc_var_key_length ( MI_KEYDEF keyinfo,
uint  nod_flag,
const uchar next_pos,
uchar org_key,
uchar prev_key,
const uchar key,
MI_KEY_PARAM s_temp 
)

◆ _mi_calc_var_pack_key_length()

int _mi_calc_var_pack_key_length ( MI_KEYDEF keyinfo,
uint  nod_flag,
const uchar next_key,
uchar org_key,
uchar prev_key,
const uchar key,
MI_KEY_PARAM s_temp 
)

◆ _mi_check_index()

int _mi_check_index ( MI_INFO info,
int  inx 
)

◆ _mi_dpointer()

void _mi_dpointer ( MI_INFO info,
uchar buff,
my_off_t  pos 
)

◆ _mi_dpos()

my_off_t _mi_dpos ( MI_INFO info,
uint  nod_flag,
const uchar after_key 
)

◆ _mi_get_binary_pack_key()

uint _mi_get_binary_pack_key ( MI_KEYDEF keyinfo,
uint  nod_flag,
uchar **  page_pos,
uchar key 
)

◆ _mi_get_key()

uchar * _mi_get_key ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uchar keypos,
uint *  return_key_length 
)

◆ _mi_get_last_key()

uchar * _mi_get_last_key ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar lastkey,
uchar endpos,
uint *  return_key_length 
)

◆ _mi_get_pack_key()

uint _mi_get_pack_key ( MI_KEYDEF keyinfo,
uint  nod_flag,
uchar **  page_pos,
uchar key 
)

◆ _mi_get_prev_key()

static bool _mi_get_prev_key ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uchar keypos,
uint *  return_key_length 
)
static

◆ _mi_get_static_key()

uint _mi_get_static_key ( MI_KEYDEF keyinfo,
uint  nod_flag,
uchar **  page,
uchar key 
)

◆ _mi_keylength()

uint _mi_keylength ( MI_KEYDEF keyinfo,
const uchar key 
)

◆ _mi_keylength_part()

uint _mi_keylength_part ( MI_KEYDEF keyinfo,
const uchar key,
HA_KEYSEG end 
)

◆ _mi_kpointer()

void _mi_kpointer ( MI_INFO info,
uchar buff,
my_off_t  pos 
)

◆ _mi_kpos()

my_off_t _mi_kpos ( uint  nod_flag,
uchar after_key 
)

◆ _mi_move_key()

uchar * _mi_move_key ( MI_KEYDEF keyinfo,
uchar to,
const uchar from 
)

◆ _mi_prefix_search()

int _mi_prefix_search ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uint  key_len,
uint  nextflag,
uchar **  ret_pos,
uchar buff,
bool *  last_key 
)

◆ _mi_rec_pos()

my_off_t _mi_rec_pos ( MYISAM_SHARE s,
uchar ptr 
)

◆ _mi_search()

int _mi_search ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
uint  key_len,
uint  nextflag,
my_off_t  pos 
)

◆ _mi_search_first()

int _mi_search_first ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  pos 
)

◆ _mi_search_last()

int _mi_search_last ( MI_INFO info,
MI_KEYDEF keyinfo,
my_off_t  pos 
)

◆ _mi_search_next()

int _mi_search_next ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar key,
uint  key_length,
uint  nextflag,
my_off_t  pos 
)

◆ _mi_seq_search()

int _mi_seq_search ( MI_INFO info,
MI_KEYDEF keyinfo,
uchar page,
uchar key,
uint  key_len,
uint  comp_flag,
uchar **  ret_pos,
uchar buff,
bool *  last_key 
)

◆ _mi_store_bin_pack_key()

void _mi_store_bin_pack_key ( MI_KEYDEF keyinfo,
uchar key_pos,
MI_KEY_PARAM s_temp 
)

◆ _mi_store_static_key()

void _mi_store_static_key ( MI_KEYDEF keyinfo,
uchar key_pos,
MI_KEY_PARAM s_temp 
)

◆ _mi_store_var_pack_key()

void _mi_store_var_pack_key ( MI_KEYDEF keyinfo,
uchar key_pos,
MI_KEY_PARAM s_temp 
)