summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-07-31 11:58:29 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-07-31 11:58:29 +0200
commit865e807125d1d3fb2d784ea33f1154ba999466ec (patch)
treeea354d6e52e97f599bb5d3809295daae8c9fceeb /sql/item.cc
parent14306bcbec0b6a999985008f3d33602c08058006 (diff)
parent4c21c367b332e4ebfff0b0c1f6f5140d5845588e (diff)
downloadmariadb-git-865e807125d1d3fb2d784ea33f1154ba999466ec.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index e23829c750c..f1b57c64410 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2010, 2018, MariaDB Corporation
This program is free software; you can redistribute it and/or modify
@@ -9581,6 +9581,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
if (Field::result_merge_type(fld_type) == DECIMAL_RESULT)
{
+ collation.set_numeric();
decimals= MY_MIN(MY_MAX(decimals, item->decimals), DECIMAL_MAX_SCALE);
int item_int_part= item->decimal_int_part();
int item_prec = MY_MAX(prev_decimal_int_part, item_int_part) + decimals;