summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
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 e3874d8e4fa..c90a70a6bb6 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -969,7 +969,7 @@ void Item_func_round::fix_length_and_dec()
if (tmp < 0)
decimals=0;
else
- decimals=tmp;
+ decimals=min(tmp,NOT_FIXED_DEC);
}
}
@@ -1639,7 +1639,7 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func,
func->max_length=min(initid.max_length,MAX_BLOB_WIDTH);
func->maybe_null=initid.maybe_null;
const_item_cache=initid.const_item;
- func->decimals=min(initid.decimals,31);
+ func->decimals=min(initid.decimals,NOT_FIXED_DEC);
}
initialized=1;
if (error)