1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2020-09-03 15:53:38 +03:00
78 changed files with 1535 additions and 1150 deletions

View File

@ -8195,13 +8195,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*/
@ -8232,9 +8234,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);