mirror of
https://github.com/MariaDB/server.git
synced 2026-04-27 02:35:29 +02:00
Merge from 5.1.
This commit is contained in:
commit
3ceec2f19c
32 changed files with 129 additions and 132 deletions
|
|
@ -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,7 +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
|
||||
|
|
@ -5215,8 +5215,8 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
|||
decoded_size= strtoul(c_len, NULL, 10);
|
||||
if (errno != 0)
|
||||
{
|
||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), c_len, a->name,
|
||||
DECIMAL_MAX_PRECISION);
|
||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), INT_MAX, a->name,
|
||||
static_cast<ulong>(DECIMAL_MAX_PRECISION));
|
||||
return NULL;
|
||||
}
|
||||
len= decoded_size;
|
||||
|
|
@ -5229,8 +5229,8 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
|||
decoded_size= strtoul(c_dec, NULL, 10);
|
||||
if ((errno != 0) || (decoded_size > UINT_MAX))
|
||||
{
|
||||
my_error(ER_TOO_BIG_SCALE, MYF(0), c_dec, a->name,
|
||||
DECIMAL_MAX_SCALE);
|
||||
my_error(ER_TOO_BIG_SCALE, MYF(0), INT_MAX, a->name,
|
||||
static_cast<ulong>(DECIMAL_MAX_SCALE));
|
||||
return NULL;
|
||||
}
|
||||
dec= decoded_size;
|
||||
|
|
@ -5243,14 +5243,14 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
|||
}
|
||||
if (len > DECIMAL_MAX_PRECISION)
|
||||
{
|
||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), len, a->name,
|
||||
DECIMAL_MAX_PRECISION);
|
||||
my_error(ER_TOO_BIG_PRECISION, MYF(0), static_cast<int>(len), a->name,
|
||||
static_cast<ulong>(DECIMAL_MAX_PRECISION));
|
||||
return 0;
|
||||
}
|
||||
if (dec > DECIMAL_MAX_SCALE)
|
||||
{
|
||||
my_error(ER_TOO_BIG_SCALE, MYF(0), dec, a->name,
|
||||
DECIMAL_MAX_SCALE);
|
||||
static_cast<ulong>(DECIMAL_MAX_SCALE));
|
||||
return 0;
|
||||
}
|
||||
res= new (thd->mem_root) Item_decimal_typecast(a, len, dec);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue