mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #27300:
Geometry fields have a result type string and a special subclass to cater for the differences between them and the base class (just like DATE/TIME). When creating temporary tables for results of functions that return results of type GEOMETRY we must construct fields of the derived class instead of the base class. Fixed by creating a GEOMETRY field (Field_geom) instead of a generic BLOB (Field_blob) in temp tables for the results of GIS functions that have GEOMETRY return type (Item_geometry_func).
This commit is contained in:
@ -8793,12 +8793,12 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
|
||||
|
||||
enum enum_field_types type;
|
||||
/*
|
||||
DATE/TIME fields have STRING_RESULT result type. To preserve
|
||||
type they needed to be handled separately.
|
||||
DATE/TIME and GEOMETRY fields have STRING_RESULT result type.
|
||||
To preserve type they needed to be handled separately.
|
||||
*/
|
||||
if ((type= item->field_type()) == MYSQL_TYPE_DATETIME ||
|
||||
type == MYSQL_TYPE_TIME || type == MYSQL_TYPE_DATE ||
|
||||
type == MYSQL_TYPE_TIMESTAMP)
|
||||
type == MYSQL_TYPE_TIMESTAMP || type == MYSQL_TYPE_GEOMETRY)
|
||||
new_field= item->tmp_table_field_from_field_type(table);
|
||||
/*
|
||||
Make sure that the blob fits into a Field_varstring which has
|
||||
|
Reference in New Issue
Block a user