summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 870b2449514..bf962777a48 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -9913,18 +9913,14 @@ void Item_cache_row::set_null()
Item_type_holder::Item_type_holder(THD *thd, Item *item)
:Item(thd, item),
Type_handler_hybrid_field_type(item->real_type_handler()),
- enum_set_typelib(0),
- geometry_type(Field::GEOM_GEOMETRY)
+ Type_geometry_attributes(item),
+ enum_set_typelib(0)
{
DBUG_ASSERT(item->fixed);
maybe_null= item->maybe_null;
get_full_info(item);
DBUG_ASSERT(!decimals || Item_type_holder::result_type() != INT_RESULT);
prev_decimal_int_part= item->decimal_int_part();
-#ifdef HAVE_SPATIAL
- if (item->field_type() == MYSQL_TYPE_GEOMETRY)
- geometry_type= item->get_geometry_type();
-#endif /* HAVE_SPATIAL */
}
@@ -9977,9 +9973,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
else
decimals= MY_MAX(decimals, item->decimals);
- if (Item_type_holder::field_type() == FIELD_TYPE_GEOMETRY)
- geometry_type=
- Field_geom::geometry_type_merge(geometry_type, item->get_geometry_type());
+ Type_geometry_attributes::join(item);
if (Item_type_holder::result_type() == DECIMAL_RESULT)
{