mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-4521 MBRContains, MBRWithin no longer work with geometries of different type.
get_mm_leaf function can store all sorts of spatial features in one type of field it receives from an Item_field. So we just allow that by setting the type of this field to GEOMETRY. per-file comments: mysql-test/r/gis-rtree.result result updated mysql-test/t/gis-rtree.test test case added. sql/opt_range.cc set geom_type=GEOMETRY if we got Field_geom.
This commit is contained in:
@@ -7294,6 +7294,14 @@ static SEL_TREE *get_full_func_mm_tree(RANGE_OPT_PARAM *param,
|
||||
param->current_table);
|
||||
DBUG_ENTER("get_full_func_mm_tree");
|
||||
|
||||
#ifdef HAVE_SPATIAL
|
||||
if (field_item->field->type() == MYSQL_TYPE_GEOMETRY)
|
||||
{
|
||||
/* We have to be able to store all sorts of spatial features here */
|
||||
((Field_geom*) field_item->field)->geom_type= Field::GEOM_GEOMETRY;
|
||||
}
|
||||
#endif /*HAVE_SPATIAL*/
|
||||
|
||||
for (uint i= 0; i < cond_func->arg_count; i++)
|
||||
{
|
||||
Item *arg= cond_func->arguments()[i]->real_item();
|
||||
|
Reference in New Issue
Block a user