~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_rename.c

  • Committer: Monty Taylor
  • Date: 2008-07-05 11:08:18 UTC
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: monty@inaugust.com-20080705110818-xyc8ehdym3r7nf6t
Add Jay's test optoins at the target of make test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include "mysys_priv.h"
17
17
#include <my_dir.h>
18
18
#include "mysys_err.h"
19
 
#include <mystrings/m_string.h>
 
19
#include "m_string.h"
20
20
#undef my_rename
21
21
 
22
22
        /* On unix rename deletes to file if it exists */
24
24
int my_rename(const char *from, const char *to, myf MyFlags)
25
25
{
26
26
  int error = 0;
 
27
  DBUG_ENTER("my_rename");
 
28
  DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags));
27
29
 
28
30
#if defined(HAVE_FILE_VERSIONS)
29
31
  {                             /* Check that there isn't a old file */
36
38
      error= -1;
37
39
      if (MyFlags & MY_FAE+MY_WME)
38
40
        my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,my_errno);
39
 
      return(error);
 
41
      DBUG_RETURN(error);
40
42
    }
41
43
    my_errno=save_errno;
42
44
  }
66
68
      error= -1;
67
69
#endif
68
70
  }
69
 
  return(error);
 
71
  DBUG_RETURN(error);
70
72
} /* my_rename */