20 #include <my_pthread.h>
32 #define HP_MIN_RECORDS_IN_BLOCK 16
33 #define HP_MAX_RECORDS_IN_BLOCK 8192
37 extern LIST *heap_open_list,*heap_share_list;
39 #define test_active(info) \
40 if (!(info->update & HA_STATE_AKTIV))\
41 { my_errno=HA_ERR_NO_ACTIVE_RECORD; DBUG_RETURN(-1); }
42 #define hp_find_hash(A,B) ((HASH_INFO*) hp_find_block((A),(B)))
45 #define hp_find_record(info,pos) (info)->current_ptr= hp_find_block(&(info)->s->block,pos)
62 extern int hp_rectest(
HP_INFO *info,
const uchar *old);
63 extern uchar *hp_find_block(
HP_BLOCK *info,ulong pos);
64 extern int hp_get_new_block(
HP_BLOCK *info,
size_t* alloc_length);
69 const uchar *
record, uchar *recpos);
71 const uchar *
record, uchar *recpos);
73 const uchar *
record,uchar *recpos,
int flag);
75 const uchar *
record,uchar *recpos,
int flag);
81 extern ulong hp_hashnr(
HP_KEYDEF *keyinfo,
const uchar *key);
82 extern ulong hp_rec_hashnr(
HP_KEYDEF *keyinfo,
const uchar *
rec);
83 extern ulong hp_mask(ulong hashnr,ulong buffmax,ulong maxlength);
86 extern int hp_rec_key_cmp(
HP_KEYDEF *keydef,
const uchar *rec1,
88 my_bool diff_if_only_endspace_difference);
89 extern int hp_key_cmp(
HP_KEYDEF *keydef,
const uchar *
rec,
91 extern void hp_make_key(
HP_KEYDEF *keydef,uchar *key,
const uchar *
rec);
92 extern uint hp_rb_make_key(
HP_KEYDEF *keydef, uchar *key,
93 const uchar *
rec, uchar *recpos);
94 extern uint hp_rb_key_length(
HP_KEYDEF *keydef,
const uchar *key);
95 extern uint hp_rb_null_key_length(
HP_KEYDEF *keydef,
const uchar *key);
96 extern uint hp_rb_var_key_length(
HP_KEYDEF *keydef,
const uchar *key);
97 extern my_bool hp_if_null_in_key(
HP_KEYDEF *keyinfo,
const uchar *
record);
98 extern int hp_close(
register HP_INFO *info);
99 extern void hp_clear(
HP_SHARE *info);
100 extern void hp_clear_keys(
HP_SHARE *info);
101 extern uint hp_rb_pack_key(
HP_KEYDEF *keydef, uchar *key,
const uchar *old,
102 key_part_map keypart_map);
106 #ifdef HAVE_PSI_INTERFACE
107 extern PSI_mutex_key hp_key_mutex_HP_SHARE_intern_lock;
108 void init_heap_psi_keys();