summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-06-02 12:00:37 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-06-02 12:00:37 +0500
commit86e425fe113c8999477ec3f387f8fcf8b2d79df1 (patch)
treeb8b717274fcaa61b9c8b0968f2a1d0656b2f630e /sql/item_func.cc
parent39d0b1bd5b7c56bf2baaa156353ace1b2131bc74 (diff)
parent33734e956fb06435168ad4630515c02358871a0e (diff)
downloadmariadb-git-86e425fe113c8999477ec3f387f8fcf8b2d79df1.tar.gz
5.0-bugteam->5.1-bugteam merge
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 85e5de7b980..4cc3c609c0e 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1944,8 +1944,8 @@ void Item_func_round::fix_length_and_dec()
unsigned_flag= args[0]->unsigned_flag;
if (!args[1]->const_item())
{
- max_length= args[0]->max_length;
decimals= args[0]->decimals;
+ max_length= float_length(decimals);
if (args[0]->result_type() == DECIMAL_RESULT)
{
max_length++;
@@ -1965,8 +1965,8 @@ void Item_func_round::fix_length_and_dec()
if (args[0]->decimals == NOT_FIXED_DEC)
{
- max_length= args[0]->max_length;
decimals= min(decimals_to_set, NOT_FIXED_DEC);
+ max_length= float_length(decimals);
hybrid_type= REAL_RESULT;
return;
}