~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_close.c

  • Committer: Jay Pipes
  • Date: 2008-07-16 16:14:22 UTC
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: jay@mysql.com-20080716161422-fy1bl8o5q7m8kglq
Removed all DBUG symbols from heap storage engine

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");
27
26
  pthread_mutex_lock(&THR_LOCK_heap);
28
27
  tmp= hp_close(info);
29
28
  pthread_mutex_unlock(&THR_LOCK_heap);
30
 
  DBUG_RETURN(tmp);
 
29
  return(tmp);
31
30
}
32
31
 
33
32
 
34
33
int hp_close(register HP_INFO *info)
35
34
{
36
35
  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
44
36
  info->s->changed=0;
45
37
  if (info->open_list.data)
46
38
    heap_open_list=list_delete(heap_open_list,&info->open_list);
47
39
  if (!--info->s->open_count && info->s->delete_on_close)
48
40
    hp_free(info->s);                           /* Table was deleted */
49
41
  my_free((uchar*) info,MYF(0));
50
 
  DBUG_RETURN(error);
 
42
  return(error);
51
43
}