31 #include <my_pthread.h>
34 #include "my_compare.h"
39 #define HP_MAX_LEVELS 4
40 #define HP_PTRS_IN_NOD 128
49 ulonglong data_length;
50 ulonglong index_length;
53 ulonglong auto_increment;
62 uchar *blocks[HP_PTRS_IN_NOD];
68 uint free_ptrs_in_block;
75 ulong records_under_level;
106 uint records_in_block;
108 ulong last_allocated;
125 ha_rows hash_buckets;
128 const uchar *
record, uchar *recpos);
130 const uchar *
record, uchar *recpos,
int flag);
131 uint (*get_key_length)(
struct st_hp_keydef *keydef,
const uchar *key);
138 ulong min_records,max_records;
139 ulonglong data_length,index_length,max_table_size;
140 uint key_stat_version;
146 uint keys,max_key_length;
147 uint currently_disabled_keys;
154 my_bool delete_on_close;
158 ulonglong auto_increment;
168 ulong current_record,next_block;
171 uint opt_flag,update;
174 enum ha_rkey_function last_find_flag;
178 my_bool implicit_emptied;
193 ulonglong max_table_size;
194 ulonglong auto_increment;
195 my_bool with_auto_increment;
196 my_bool internal_table;
209 extern void heap_release_share(
HP_SHARE *share, my_bool internal_table);
210 extern int heap_close(
HP_INFO *info);
211 extern int heap_write(
HP_INFO *info,
const uchar *buff);
212 extern int heap_update(
HP_INFO *info,
const uchar *old,
const uchar *newdata);
213 extern int heap_rrnd(
HP_INFO *info,uchar *
buf,uchar *pos);
214 extern int heap_scan_init(
HP_INFO *info);
216 extern int heap_delete(
HP_INFO *info,
const uchar *buff);
218 extern int heap_create(
const char *
name,
220 my_bool *created_new_share);
221 extern int heap_delete_table(
const char *
name);
222 extern void heap_drop_table(
HP_INFO *info);
223 extern int heap_extra(
HP_INFO *info,
enum ha_extra_function
function);
224 extern int heap_reset(
HP_INFO *info);
225 extern int heap_rename(
const char *old_name,
const char *new_name);
226 extern int heap_panic(
enum ha_panic_function flag);
232 extern void heap_clear(
HP_INFO *info);
233 extern void heap_clear_keys(
HP_INFO *info);
234 extern int heap_disable_indexes(
HP_INFO *info);
235 extern int heap_enable_indexes(
HP_INFO *info);
236 extern int heap_indexes_are_disabled(
HP_INFO *info);
237 extern void heap_update_auto_increment(
HP_INFO *info,
const uchar *
record);
240 int hp_panic(
enum ha_panic_function flag);
241 int heap_rkey(
HP_INFO *info, uchar *
record,
int inx,
const uchar *key,
242 key_part_map keypart_map,
enum ha_rkey_function find_flag);
243 extern uchar * heap_find(
HP_INFO *info,
int inx,
const uchar *key);
244 extern int heap_check_heap(
HP_INFO *info, my_bool print_status);
245 extern uchar *heap_position(
HP_INFO *info);
251 #if defined(WANT_OLD_HEAP_VERSION) || defined(OLD_HEAP_VERSION)
252 extern int heap_rrnd_old(
HP_INFO *info,uchar *
buf,ulong pos);
253 extern ulong heap_position_old(
HP_INFO *info);
255 #ifdef OLD_HEAP_VERSION
256 typedef ulong HEAP_PTR;
257 #define heap_position(A) heap_position_old(A)
258 #define heap_rrnd(A,B,C) heap_rrnd_old(A,B,C)
260 typedef uchar *HEAP_PTR;