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

« back to all changes in this revision

Viewing changes to sql/unireg.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) 2000-2006 MySQL AB
 
1
/*
 
2
   Copyright (c) 2000, 2011, 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
 
 
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
16
17
 
17
18
/*
18
19
  Functions to create a unireg form-file from a FIELD and a fieldname-fieldinfo
237
238
    if ((thd->variables.sql_mode &
238
239
         (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
239
240
    {
240
 
      my_error(ER_TOO_LONG_TABLE_COMMENT, MYF(0), table, tmp_len);
 
241
      my_error(ER_TOO_LONG_TABLE_COMMENT, MYF(0), table,
 
242
               static_cast<ulong>(tmp_len));
241
243
      goto err;
242
244
    }
243
245
    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
244
246
                        ER_TOO_LONG_TABLE_COMMENT,
245
247
                        ER(ER_TOO_LONG_TABLE_COMMENT),
246
 
                        table, tmp_len);
 
248
                        table, static_cast<ulong>(tmp_len));
247
249
    create_info->comment.length= tmp_len;
248
250
  }
249
251
 
621
623
      if ((current_thd->variables.sql_mode &
622
624
           (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
623
625
      {
624
 
        my_error(ER_TOO_LONG_FIELD_COMMENT, MYF(0), field->field_name, tmp_len);
 
626
        my_error(ER_TOO_LONG_FIELD_COMMENT, MYF(0), field->field_name,
 
627
                 static_cast<ulong>(tmp_len));
625
628
        DBUG_RETURN(1);
626
629
      }
627
630
      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
628
631
                          ER_TOO_LONG_FIELD_COMMENT,
629
632
                          ER(ER_TOO_LONG_FIELD_COMMENT),
630
 
                          field->field_name, tmp_len);
 
633
                          field->field_name, static_cast<ulong>(tmp_len));
631
634
      field->comment.length= tmp_len;
632
635
    }
633
636
 
711
714
 
712
715
  if (reclength > (ulong) file->max_record_length())
713
716
  {
714
 
    my_error(ER_TOO_BIG_ROWSIZE, MYF(0), (uint) file->max_record_length());
 
717
    my_error(ER_TOO_BIG_ROWSIZE, MYF(0), static_cast<long>(file->max_record_length()));
715
718
    DBUG_RETURN(1);
716
719
  }
717
720
  /* Hack to avoid bugs with small static rows in MySQL */