diff options
author | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:21:08 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:21:08 +0200 |
commit | 3ceec2f19cff22d7b6078b6a8d5788fa19264b8a (patch) | |
tree | 43fd6afdae9f8879ad4cdbb000497fee7cba02f4 /sql/item_create.cc | |
parent | 955cb796e7672d1186f44de84528b7b8fe47f0c9 (diff) | |
parent | 12c42b980aa94105a9108d4f58c5dc75d96ec824 (diff) | |
download | mariadb-git-3ceec2f19cff22d7b6078b6a8d5788fa19264b8a.tar.gz |
Merge from 5.1.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 1ae65926013..28cc5beaf25 100644 --- a/sql/item_create.cc +++ b/sql/item_create.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,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); |