~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_close.c

  • Committer: Mats Kindahl
  • Date: 2008-08-25 11:54:47 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 372.
  • Revision ID: mats@mysql.com-20080825115447-tg73zkyjnldm7p4c
Hiding THD::proc_info field and providing a setter and getter.
Replacing use of swap_variables() in C++ code with std::swap().
Moving swap_variables() into C files where it is used.
Replacing some function-like macros with inline functions.

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
}