~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_close.c

Removed/replaced DBUG symbols and TRUE/FALSE

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
int heap_close(HP_INFO *info)
24
24
{
25
25
  int tmp;
 
26
  DBUG_ENTER("heap_close");
26
27
  pthread_mutex_lock(&THR_LOCK_heap);
27
28
  tmp= hp_close(info);
28
29
  pthread_mutex_unlock(&THR_LOCK_heap);
29
 
  return(tmp);
 
30
  DBUG_RETURN(tmp);
30
31
}
31
32
 
32
33
 
33
34
int hp_close(register HP_INFO *info)
34
35
{
35
36
  int error=0;
 
37
  DBUG_ENTER("hp_close");
 
38
#ifndef DBUG_OFF
 
39
  if (info->s->changed && heap_check_heap(info,0))
 
40
  {
 
41
    error=my_errno=HA_ERR_CRASHED;
 
42
  }
 
43
#endif
36
44
  info->s->changed=0;
37
45
  if (info->open_list.data)
38
46
    heap_open_list=list_delete(heap_open_list,&info->open_list);
39
47
  if (!--info->s->open_count && info->s->delete_on_close)
40
48
    hp_free(info->s);                           /* Table was deleted */
41
49
  my_free((uchar*) info,MYF(0));
42
 
  return(error);
 
50
  DBUG_RETURN(error);
43
51
}