mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Fix GCC 10.2.0 -Og -Wmaybe-uninitialized
This commit is contained in:
parent
97db6c15ea
commit
4a165f3711
1 changed files with 9 additions and 7 deletions
|
@ -7555,13 +7555,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*/
|
||||
|
||||
|
@ -7592,9 +7594,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);
|
||||
|
|
Loading…
Reference in a new issue