diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 5 |
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; |