31 DBUG_ENTER(
"heap_open_from_share");
34 2 * share->max_key_length,
40 thr_lock_data_init(&share->lock,&info->lock,NULL);
42 info->lastkey= (uchar*) (info + 1);
43 info->recbuf= (uchar*) (info->lastkey + share->max_key_length);
45 info->current_record= (ulong) ~0L;
46 info->lastinx= info->errkey= -1;
48 info->opt_flag= READ_CHECK_USED;
50 DBUG_PRINT(
"exit",(
"heap: 0x%lx reclength: %d records_in_block: %d",
51 (
long) info, share->reclength,
52 share->block.records_in_block));
64 DBUG_ENTER(
"heap_open_from_share_and_register");
67 if ((info= heap_open_from_share(share, mode)))
69 info->open_list.data= (
void*) info;
70 heap_open_list= list_add(heap_open_list,&info->open_list);
84 void heap_release_share(
HP_SHARE *share, my_bool internal_table)
92 if (--share->open_count == 0)
110 DBUG_ENTER(
"heap_open");
113 if (!(share= hp_find_named_heap(name)))
119 if ((info= heap_open_from_share(share, mode)))
121 info->open_list.data= (
void*) info;
122 heap_open_list= list_add(heap_open_list,&info->open_list);
131 HP_SHARE *hp_find_named_heap(
const char *name)
135 DBUG_ENTER(
"heap_find");
136 DBUG_PRINT(
"enter",(
"name: %s",name));
138 for (pos= heap_share_list; pos; pos= pos->next)
141 if (!strcmp(name, info->name))
143 DBUG_PRINT(
"exit", (
"Old heap_database: 0x%lx", (
long) info));