mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
Bug #29772 Error compiling with option --without-geometry
Added #ifdef HAVE_SPATIAL around geometry related code. sql/item.cc: Added #ifdef HAVE_SPATIAL around geometry related code.
This commit is contained in:
parent
5c836d24f6
commit
8ded280f3f
1 changed files with 4 additions and 0 deletions
|
@ -4357,12 +4357,14 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table)
|
|||
return new Field_blob(max_length, maybe_null, name, table,
|
||||
collation.collation);
|
||||
break; // Blob handled outside of case
|
||||
#ifdef HAVE_SPATIAL
|
||||
case MYSQL_TYPE_GEOMETRY:
|
||||
return new Field_geom(max_length, maybe_null, name, table,
|
||||
(Field::geometry_type)
|
||||
((type() == Item::TYPE_HOLDER) ?
|
||||
((Item_type_holder *)this)->get_geometry_type() :
|
||||
((Item_geometry_func *)this)->get_geometry_type()));
|
||||
#endif /* HAVE_SPATIAL */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6482,10 +6484,12 @@ Item_type_holder::Item_type_holder(THD *thd, Item *item)
|
|||
if (Field::result_merge_type(fld_type) == INT_RESULT)
|
||||
decimals= 0;
|
||||
prev_decimal_int_part= item->decimal_int_part();
|
||||
#ifdef HAVE_SPATIAL
|
||||
if (item->field_type() == MYSQL_TYPE_GEOMETRY)
|
||||
geometry_type= (item->type() == Item::FIELD_ITEM) ?
|
||||
((Item_field *)item)->get_geometry_type() :
|
||||
(Field::geometry_type)((Item_geometry_func *)item)->get_geometry_type();
|
||||
#endif /* HAVE_SPATIAL */
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue