summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-07-30 15:09:25 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-07-30 15:09:25 +0300
commit91181b225c574f65720b9ecf218a4122209a7248 (patch)
tree5a9c835e8823f29ee26f8b56a3458607448188a1 /sql/item.cc
parentd17e9a02c4a08da9ac1b8f4c653f29f067d75a22 (diff)
parentfceda2dab6f8ea6c042f910cbc1d07d5df0cbc3c (diff)
downloadmariadb-git-91181b225c574f65720b9ecf218a4122209a7248.tar.gz
Merge 5.5 into 10.0
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 49973d48912..70f3e387b57 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
@@ -9649,6 +9649,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;