~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to sql/partition_info.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
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) 2006 MySQL AB
 
1
/*
 
2
   Copyright (c) 2006, 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
/* Some general useful functions */
17
19
 
103
105
  {
104
106
    do
105
107
    {
106
 
      my_sprintf(move_ptr, (move_ptr,"p%u", (start_no + i)));
107
 
      move_ptr+=MAX_PART_NAME_SIZE;
 
108
      sprintf(move_ptr, "p%u", (start_no + i));
 
109
      move_ptr+= MAX_PART_NAME_SIZE;
108
110
    } while (++i < no_parts_arg);
109
111
  }
110
112
  else
135
137
 
136
138
  if (likely(ptr != NULL))
137
139
  {
138
 
    my_sprintf(ptr, (ptr, "%ssp%u", part_name, subpart_no));
 
140
    my_snprintf(ptr, size_alloc, "%ssp%u", part_name, subpart_no);
139
141
  }
140
142
  else
141
143
  {
1206
1208
    i= 0;
1207
1209
    while ((field= *(ptr++)))
1208
1210
    {
1209
 
      CHARSET_INFO *cs;
1210
1211
      uchar *field_buf;
1211
1212
      LINT_INIT(field_buf);
1212
1213
 
1213
1214
      if (!field_is_partition_charset(field))
1214
1215
        continue;
1215
 
      cs= ((Field_str*)field)->charset();
1216
1216
      size= field->pack_length();
1217
1217
      if (!(field_buf= (uchar*) sql_calloc(size)))
1218
1218
        goto error;