~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_format.cc

  • Committer: jay
  • Date: 2008-12-23 00:18:10 UTC
  • Revision ID: jay@piggy.tangent.org-20081223001810-026ibij22q2842k1
Had a --regex-replace by accident. Should have been --replace_column call.  Only showed up in make test, not running single test, because InnoDB key numbers were different with multiple test running.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
  else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev))
43
43
  {
44
44
    /* Put 'dir' before the given path */
45
 
    strmake(buff,dev,sizeof(buff)-1);
 
45
    strncpy(buff,dev,sizeof(buff)-1);
46
46
    pos=convert_dirname(dev,dir,NULL);
47
 
    strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev));
 
47
    strncpy(pos,buff,sizeof(buff)-1- (int) (pos-dev));
48
48
  }
49
49
 
50
50
  if (flag & MY_PACK_FILENAME)
78
78
    size_t tmp_length;
79
79
    if (flag & MY_SAFE_PATH)
80
80
      return NULL;
81
 
    tmp_length= strlength(startpos);
82
 
    (void) strmake(to,startpos,cmin(tmp_length,FN_REFLEN-1));
 
81
    tmp_length= cmin(strlength(startpos), FN_REFLEN-1);
 
82
    strncpy(to,startpos,tmp_length);
 
83
    to[tmp_length]= '\0';
83
84
  }
84
85
  else
85
86
  {
86
87
    if (to == startpos)
87
88
    {
88
 
      memcpy(buff, name, length); /* Save name for last copy */
 
89
      memmove(buff, name, length); /* Save name for last copy */
89
90
      name=buff;
90
91
    }
91
 
    pos=strmake(my_stpcpy(to,dev),name,length);
92
 
    (void) my_stpcpy(pos,ext);                  /* Don't convert extension */
 
92
    char *tmp= strcpy(to, dev) + strlen(dev);
 
93
    pos= strncpy(tmp,name,length) + length;
 
94
    (void) strcpy(pos,ext);                     /* Don't convert extension */
93
95
  }
94
96
  /*
95
97
    If MY_RETURN_REAL_PATH and MY_RESOLVE_SYMLINK is given, only do
100
102
                                   MY_RESOLVE_LINK: 0));
101
103
  else if (flag & MY_RESOLVE_SYMLINKS)
102
104
  {
103
 
    my_stpcpy(buff,to);
 
105
    strcpy(buff,to);
104
106
    (void) my_readlink(to, buff, MYF(0));
105
107
  }
106
108
  return(to);