1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2020-09-03 09:26:54 +03:00
67 changed files with 1442 additions and 1092 deletions

View File

@ -7583,13 +7583,15 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
table_map param_comp= ~(param->prev_tables | param->read_tables |
param->current_table);
#ifdef HAVE_SPATIAL
Field::geometry_type sav_geom_type;
const bool geometry= field_item->field->type() == MYSQL_TYPE_GEOMETRY;
if (geometry)
Field::geometry_type sav_geom_type= Field::GEOM_GEOMETRY, *geom_type=
field_item->field->type() == MYSQL_TYPE_GEOMETRY
? &(static_cast<Field_geom*>(field_item->field))->geom_type
: NULL;
if (geom_type)
{
sav_geom_type= ((Field_geom*) field_item->field)->geom_type;
sav_geom_type= *geom_type;
/* We have to be able to store all sorts of spatial features here */
((Field_geom*) field_item->field)->geom_type= Field::GEOM_GEOMETRY;
*geom_type= Field::GEOM_GEOMETRY;
}
#endif /*HAVE_SPATIAL*/
@ -7620,9 +7622,9 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
}
#ifdef HAVE_SPATIAL
if (geometry)
if (geom_type)
{
((Field_geom*) field_item->field)->geom_type= sav_geom_type;
*geom_type= sav_geom_type;
}
#endif /*HAVE_SPATIAL*/
DBUG_RETURN(ftree);