mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge from 5.1.
This commit is contained in:
13
sql/field.cc
13
sql/field.cc
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -11,8 +11,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
/**
|
||||
@file
|
||||
@ -9268,7 +9267,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
||||
if (decimals >= NOT_FIXED_DEC)
|
||||
{
|
||||
my_error(ER_TOO_BIG_SCALE, MYF(0), decimals, fld_name,
|
||||
NOT_FIXED_DEC-1);
|
||||
static_cast<ulong>(NOT_FIXED_DEC - 1));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
@ -9338,8 +9337,8 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
||||
my_decimal_trim(&length, &decimals);
|
||||
if (length > DECIMAL_MAX_PRECISION)
|
||||
{
|
||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), length, fld_name,
|
||||
DECIMAL_MAX_PRECISION);
|
||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), static_cast<int>(length),
|
||||
fld_name, static_cast<ulong>(DECIMAL_MAX_PRECISION));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
if (length < decimals)
|
||||
@ -9563,7 +9562,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
||||
if (length > MAX_BIT_FIELD_LENGTH)
|
||||
{
|
||||
my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), fld_name,
|
||||
MAX_BIT_FIELD_LENGTH);
|
||||
static_cast<ulong>(MAX_BIT_FIELD_LENGTH));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
pack_length= (length + 7) / 8;
|
||||
|
Reference in New Issue
Block a user