~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rename.c

  • Committer: Toru Maesaka
  • Date: 2008-12-17 07:16:37 UTC
  • mto: (685.1.40 devel) (713.1.5 devel)
  • mto: This revision was merged to the branch mainline in revision 713.
  • Revision ID: dev@torum.net-20081217071637-7j9040w7lpms77r2
Removed my_time() and added error checking

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
*/
19
19
 
20
20
#include "heapdef.h"
 
21
#include <string.h>
21
22
 
22
23
int heap_rename(const char *old_name, const char *new_name)
23
24
{
27
28
  pthread_mutex_lock(&THR_LOCK_heap);
28
29
  if ((info = hp_find_named_heap(old_name)))
29
30
  {
30
 
    if (!(name_buff=(char*) my_strdup(new_name,MYF(MY_WME))))
 
31
    if (!(name_buff=(char*) strdup(new_name)))
31
32
    {
32
33
      pthread_mutex_unlock(&THR_LOCK_heap);
33
34
      return(my_errno);