~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rename.c

mergeĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
{
24
24
  register HP_SHARE *info;
25
25
  char *name_buff;
 
26
  DBUG_ENTER("heap_rename");
26
27
 
27
28
  pthread_mutex_lock(&THR_LOCK_heap);
28
29
  if ((info = hp_find_named_heap(old_name)))
30
31
    if (!(name_buff=(char*) my_strdup(new_name,MYF(MY_WME))))
31
32
    {
32
33
      pthread_mutex_unlock(&THR_LOCK_heap);
33
 
      return(my_errno);
 
34
      DBUG_RETURN(my_errno);
34
35
    }
35
 
    free(info->name);
 
36
    my_free(info->name,MYF(0));
36
37
    info->name=name_buff;
37
38
  }
38
39
  pthread_mutex_unlock(&THR_LOCK_heap);
39
 
  return(0);
 
40
  DBUG_RETURN(0);
40
41
}