• unknown's avatar
    Bug #31155 gis types in union'd select cause crash. · f0bbd9c4
    unknown authored
    We use get_geometry_type() call to decide the exact type
    of a geometry field to be created (POINT, POLYGON etc)
    Though this function was only implemented for few items.
    In the bug's case we need to call this function for the
    Item_sum instance, where it was not implemented, what is
    the reason of the crash.
    Fixed by implementing virtual Item::get_geometry_type(),
    so it can be called for any Item.
    
    
    sql/item.h:
      Bug #31155 gis types in union'd select cause crash.
      virtual Item::geometry_type() added instead of
      various geometry_type() fucntions.
    sql/item.cc:
      Bug #31155 gis types in union'd select cause crash.
      
      Unified virtual ::get_geometry_type() function used
    sql/item_geofunc.cc:
      Bug #31155 gis types in union'd select cause crash.
      
      virtual Item::geometry_type() implemented for geo-Items.
      Mostly previous ::get_geometry_type() implementation changed
    sql/item_geofunc.h:
      Bug #31155 gis types in union'd select cause crash.
      
      get_geometry_type() declarations unified
    f0bbd9c4
item_geofunc.cc 16.1 KB