~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_rename.cc

  • Committer: Brian Aker
  • Date: 2010-08-08 04:21:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1697.
  • Revision ID: brian@gaz-20100808042129-x4we3721ql8lfsje
Update for HEAP to convert its lock to boost.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
  register HP_SHARE *info;
27
27
  char *name_buff;
28
28
 
29
 
  pthread_mutex_lock(&THR_LOCK_heap);
 
29
  THR_LOCK_heap.lock();
30
30
  if ((info = hp_find_named_heap(old_name)))
31
31
  {
32
32
    if (!(name_buff=(char*) strdup(new_name)))
33
33
    {
34
 
      pthread_mutex_unlock(&THR_LOCK_heap);
 
34
      THR_LOCK_heap.unlock();
35
35
      return(errno);
36
36
    }
37
37
    free(info->name);
38
38
    info->name=name_buff;
39
39
  }
40
 
  pthread_mutex_unlock(&THR_LOCK_heap);
 
40
  THR_LOCK_heap.unlock();
41
41
  return(0);
42
42
}