MySQL 8.4.2
Source Code Documentation
heapdef.h File Reference
#include "heap.h"
#include "my_base.h"
#include "my_sys.h"
#include "my_thread.h"
#include "my_thread_local.h"
#include "my_tree.h"

Go to the source code of this file.

Classes

struct  HASH_INFO
 
struct  heap_rb_param
 

Macros

#define HP_MIN_RECORDS_IN_BLOCK   16
 
#define HP_MAX_RECORDS_IN_BLOCK   8192
 
#define test_active(info)
 
#define hp_find_hash(A, B)   ((HASH_INFO *)hp_find_block((A), (B)))
 
#define hp_find_record(info, pos)    (info)->current_ptr = hp_find_block(&(info)->s->block, pos)
 

Functions

HP_SHAREhp_find_named_heap (const char *name)
 
int hp_rectest (HP_INFO *info, const uchar *old)
 
ucharhp_find_block (HP_BLOCK *info, ulong pos)
 
int hp_get_new_block (HP_BLOCK *info, size_t *alloc_length)
 
void hp_free (HP_SHARE *info)
 
ucharhp_free_level (HP_BLOCK *block, uint level, HP_PTRS *pos, uchar *last_pos)
 
int hp_write_key (HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *record, uchar *recpos)
 
int hp_rb_write_key (HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *record, uchar *recpos)
 
int hp_rb_delete_key (HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *record, uchar *recpos, int flag)
 
int hp_delete_key (HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *record, uchar *recpos, int flag)
 
HASH_INFO_heap_find_hash (HP_BLOCK *block, ulong pos)
 
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_hashnr (HP_KEYDEF *keyinfo, const uchar *key)
 
uint64 hp_rec_hashnr (HP_KEYDEF *keyinfo, const uchar *rec)
 
uint64 hp_mask (uint64 hashnr, uint64 buffmax, uint64 maxlength)
 
void hp_movelink (HASH_INFO *pos, HASH_INFO *next_link, HASH_INFO *newlink)
 
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_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 *keyinfo, const uchar *record)
 
int hp_close (HP_INFO *info)
 
void hp_clear (HP_SHARE *info)
 
void hp_clear_keys (HP_SHARE *info)
 
uint hp_rb_pack_key (const HP_KEYDEF *keydef, uchar *key, const uchar *old, key_part_map keypart_map)
 
void init_heap_psi_keys ()
 

Variables

LISTheap_open_list
 
LISTheap_share_list
 
mysql_mutex_t THR_LOCK_heap
 
PSI_memory_key hp_key_memory_HP_SHARE
 
PSI_memory_key hp_key_memory_HP_INFO
 
PSI_memory_key hp_key_memory_HP_PTRS
 
PSI_memory_key hp_key_memory_HP_KEYDEF
 

Macro Definition Documentation

◆ hp_find_hash

#define hp_find_hash (   A,
 
)    ((HASH_INFO *)hp_find_block((A), (B)))

◆ hp_find_record

#define hp_find_record (   info,
  pos 
)     (info)->current_ptr = hp_find_block(&(info)->s->block, pos)

◆ HP_MAX_RECORDS_IN_BLOCK

#define HP_MAX_RECORDS_IN_BLOCK   8192

◆ HP_MIN_RECORDS_IN_BLOCK

#define HP_MIN_RECORDS_IN_BLOCK   16

◆ test_active

#define test_active (   info)
Value:
if (!(info->update & HA_STATE_AKTIV)) { \
set_my_errno(HA_ERR_NO_ACTIVE_RECORD); \
return -1; \
}
#define HA_ERR_NO_ACTIVE_RECORD
No record read in update()
Definition: my_base.h:845
#define HA_STATE_AKTIV
Definition: my_base.h:1042

Function Documentation

◆ _heap_find_hash()

HASH_INFO * _heap_find_hash ( HP_BLOCK block,
ulong  pos 
)

◆ hp_clear()

void hp_clear ( HP_SHARE info)

◆ hp_clear_keys()

void hp_clear_keys ( HP_SHARE info)

◆ hp_close()

int hp_close ( HP_INFO info)

◆ hp_delete_key()

int hp_delete_key ( HP_INFO info,
HP_KEYDEF keyinfo,
const uchar record,
uchar recpos,
int  flag 
)

◆ hp_find_block()

uchar * hp_find_block ( HP_BLOCK info,
ulong  pos 
)

◆ hp_find_named_heap()

HP_SHARE * hp_find_named_heap ( const char *  name)

◆ hp_free()

void hp_free ( HP_SHARE info)

◆ hp_free_level()

uchar * hp_free_level ( HP_BLOCK block,
uint  level,
HP_PTRS pos,
uchar last_pos 
)

◆ hp_get_new_block()

int hp_get_new_block ( HP_BLOCK info,
size_t *  alloc_length 
)

◆ hp_hashnr()

uint64 hp_hashnr ( HP_KEYDEF keyinfo,
const uchar key 
)

◆ hp_if_null_in_key()

bool hp_if_null_in_key ( HP_KEYDEF keyinfo,
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_delete_key()

int hp_rb_delete_key ( HP_INFO info,
HP_KEYDEF keyinfo,
const uchar record,
uchar recpos,
int  flag 
)

◆ 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_var_key_length()

uint hp_rb_var_key_length ( HP_KEYDEF keydef,
const uchar key 
)

◆ hp_rb_write_key()

int hp_rb_write_key ( HP_INFO info,
HP_KEYDEF keyinfo,
const uchar record,
uchar recpos 
)

◆ hp_rec_hashnr()

uint64 hp_rec_hashnr ( HP_KEYDEF keyinfo,
const uchar rec 
)

◆ hp_rec_key_cmp()

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

◆ hp_rectest()

int hp_rectest ( HP_INFO info,
const uchar old 
)

◆ 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 
)

◆ hp_write_key()

int hp_write_key ( HP_INFO info,
HP_KEYDEF keyinfo,
const uchar record,
uchar recpos 
)

◆ init_heap_psi_keys()

void init_heap_psi_keys ( )

Variable Documentation

◆ heap_open_list

LIST* heap_open_list
extern

◆ heap_share_list

LIST * heap_share_list

◆ hp_key_memory_HP_INFO

PSI_memory_key hp_key_memory_HP_INFO
extern

◆ hp_key_memory_HP_KEYDEF

PSI_memory_key hp_key_memory_HP_KEYDEF
extern

◆ hp_key_memory_HP_PTRS

PSI_memory_key hp_key_memory_HP_PTRS
extern

◆ hp_key_memory_HP_SHARE

PSI_memory_key hp_key_memory_HP_SHARE
extern

◆ THR_LOCK_heap

mysql_mutex_t THR_LOCK_heap
extern