~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to storage/myisam/myisamlog.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2006 MySQL AB
 
1
/*
 
2
   Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
/* write whats in isam.log */
17
19
 
382
384
               curr_file_info->show_name);
383
385
      if (my_b_read(&cache,(uchar*) head,2))
384
386
        goto err;
 
387
      buff= 0;
385
388
      file_info.name=0;
386
389
      file_info.show_name=0;
387
390
      file_info.record=0;
388
 
      if (read_string(&cache,(uchar**) &file_info.name,
389
 
                      (uint) mi_uint2korr(head)))
 
391
      if (read_string(&cache, &buff, (uint) mi_uint2korr(head)))
390
392
        goto err;
391
393
      {
392
394
        uint i;
393
395
        char *pos,*to;
394
396
 
395
397
        /* Fix if old DOS files to new format */
396
 
        for (pos=file_info.name; (pos=strchr(pos,'\\')) ; pos++)
 
398
        for (pos=file_info.name=(char*)buff; (pos=strchr(pos,'\\')) ; pos++)
397
399
          *pos= '/';
398
400
 
399
401
        pos=file_info.name;
692
694
    *to= 0;
693
695
    DBUG_RETURN(1);
694
696
  }
695
 
  *((char*) *to+length)= '\0';
 
697
  *((uchar*) *to+length)= '\0';
696
698
  DBUG_RETURN (0);
697
699
}                               /* read_string */
698
700