32HP_INFO *heap_open_from_share(HP_SHARE *share,
int mode)
34 HP_INFO *info=
new HP_INFO;
37 info->setShare(share);
38 info->lastkey.resize(share->max_key_length);
40 info->current_record= UINT32_MAX;
41 info->lastinx= info->errkey= -1;
50HP_INFO *heap_open_from_share_and_register(HP_SHARE *share,
int mode)
55 if ((info= heap_open_from_share(share, mode)))
57 heap_open_list.push_front(info);
59 THR_LOCK_heap.unlock();
72HP_INFO *heap_open(
const char *name,
int mode)
78 if (!(share= hp_find_named_heap(name)))
81 THR_LOCK_heap.unlock();
84 if ((info= heap_open_from_share(share, mode)))
86 heap_open_list.push_front(info);
88 THR_LOCK_heap.unlock();
95HP_SHARE *hp_find_named_heap(
const char *name)
97 list<HP_SHARE *>::iterator it= heap_share_list.begin();
98 while (it != heap_share_list.end())
100 if (not (*it)->name.compare(name))
106 return((HP_SHARE *) 0);