summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-09-19 12:06:50 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-09-19 12:06:50 +0300
commitec6042bda097fa53c43caf4a1acc32c5a77f6ed4 (patch)
tree751af6227789bfa916a6de426542a966845c8cd1 /sql/item.cc
parentba0ee91077d9b89296328892aa5d5d293f4e0fb1 (diff)
parentb337a0682943fa7e055380b7859762acf7fb588c (diff)
downloadmariadb-git-ec6042bda097fa53c43caf4a1acc32c5a77f6ed4.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index d4f3525c27c..da1692ecbf8 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1742,7 +1742,10 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
{
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
}
- collation.set(value_item->collation.collation, DERIVATION_IMPLICIT);
+ if (value_item->collation.derivation == DERIVATION_NUMERIC)
+ collation.set_numeric();
+ else
+ collation.set(value_item->collation.collation, DERIVATION_IMPLICIT);
max_length= value_item->max_length;
decimals= value_item->decimals;
fixed= 1;