Commit 4a165f37 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix GCC 10.2.0 -Og -Wmaybe-uninitialized

parent 97db6c15
...@@ -7555,13 +7555,15 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param, ...@@ -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 | table_map param_comp= ~(param->prev_tables | param->read_tables |
param->current_table); param->current_table);
#ifdef HAVE_SPATIAL #ifdef HAVE_SPATIAL
Field::geometry_type sav_geom_type; Field::geometry_type sav_geom_type= Field::GEOM_GEOMETRY, *geom_type=
const bool geometry= field_item->field->type() == MYSQL_TYPE_GEOMETRY; field_item->field->type() == MYSQL_TYPE_GEOMETRY
if (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 */ /* 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*/ #endif /*HAVE_SPATIAL*/
...@@ -7592,9 +7594,9 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param, ...@@ -7592,9 +7594,9 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
} }
#ifdef HAVE_SPATIAL #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*/ #endif /*HAVE_SPATIAL*/
DBUG_RETURN(ftree); DBUG_RETURN(ftree);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment