Loading sql/item.cc +3 −8 Original line number Diff line number Diff line Loading @@ -4399,11 +4399,8 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table) collation.collation); break; // Blob handled outside of case case MYSQL_TYPE_GEOMETRY: return new Field_geom(max_length, maybe_null, name, table, (Field::geometry_type) ((type() == Item::TYPE_HOLDER) ? ((Item_type_holder *)this)->get_geometry_type() : ((Item_geometry_func *)this)->get_geometry_type())); return new Field_geom(max_length, maybe_null, name, table, get_geometry_type()); } } Loading Loading @@ -6524,9 +6521,7 @@ Item_type_holder::Item_type_holder(THD *thd, Item *item) decimals= 0; prev_decimal_int_part= item->decimal_int_part(); if (item->field_type() == MYSQL_TYPE_GEOMETRY) geometry_type= (item->type() == Item::FIELD_ITEM) ? ((Item_field *)item)->get_geometry_type() : (Field::geometry_type)((Item_geometry_func *)item)->get_geometry_type(); geometry_type= item->get_geometry_type(); } Loading sql/item.h +4 −2 Original line number Diff line number Diff line Loading @@ -870,6 +870,8 @@ class Item { */ virtual bool result_as_longlong() { return FALSE; } bool is_datetime(); virtual Field::geometry_type get_geometry_type() const { return Field::GEOM_GEOMETRY; }; String *check_well_formed_result(String *str); }; Loading Loading @@ -1338,7 +1340,7 @@ class Item_field :public Item_ident int fix_outer_field(THD *thd, Field **field, Item **reference); virtual Item *update_value_transformer(byte *select_arg); void print(String *str); Field::geometry_type get_geometry_type() Field::geometry_type get_geometry_type() const { DBUG_ASSERT(field_type() == MYSQL_TYPE_GEOMETRY); return field->get_geometry_type(); Loading Loading @@ -2640,7 +2642,7 @@ class Item_type_holder: public Item Field *make_field_by_type(TABLE *table); static uint32 display_length(Item *item); static enum_field_types get_real_type(Item *); Field::geometry_type get_geometry_type() { return geometry_type; }; Field::geometry_type get_geometry_type() const { return geometry_type; }; }; Loading sql/item_geofunc.cc +7 −11 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg) { return new Field_geom(max_length, maybe_null, name, t_arg, (Field::geometry_type) get_geometry_type()); get_geometry_type()); } void Item_geometry_func::fix_length_and_dec() Loading @@ -38,10 +38,6 @@ void Item_geometry_func::fix_length_and_dec() maybe_null= 1; } int Item_geometry_func::get_geometry_type() const { return (int)Field::GEOM_GEOMETRY; } String *Item_func_geometry_from_text::val_str(String *str) { Loading Loading @@ -160,9 +156,9 @@ String *Item_func_geometry_type::val_str(String *str) } int Item_func_envelope::get_geometry_type() const Field::geometry_type Item_func_envelope::get_geometry_type() const { return (int) Field::GEOM_POLYGON; return Field::GEOM_POLYGON; } Loading Loading @@ -190,9 +186,9 @@ String *Item_func_envelope::val_str(String *str) } int Item_func_centroid::get_geometry_type() const Field::geometry_type Item_func_centroid::get_geometry_type() const { return (int) Field::GEOM_POINT; return Field::GEOM_POINT; } Loading Loading @@ -330,9 +326,9 @@ String *Item_func_spatial_decomp_n::val_str(String *str) */ int Item_func_point::get_geometry_type() const Field::geometry_type Item_func_point::get_geometry_type() const { return (int) Field::GEOM_POINT; return Field::GEOM_POINT; } Loading sql/item_geofunc.h +3 −4 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ class Item_geometry_func: public Item_str_func void fix_length_and_dec(); enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; } Field *tmp_table_field(TABLE *t_arg); virtual int get_geometry_type() const; bool is_null() { (void) val_int(); return null_value; } }; Loading Loading @@ -92,7 +91,7 @@ class Item_func_centroid: public Item_geometry_func Item_func_centroid(Item *a): Item_geometry_func(a) {} const char *func_name() const { return "centroid"; } String *val_str(String *); int get_geometry_type() const; Field::geometry_type get_geometry_type() const; }; class Item_func_envelope: public Item_geometry_func Loading @@ -101,7 +100,7 @@ class Item_func_envelope: public Item_geometry_func Item_func_envelope(Item *a): Item_geometry_func(a) {} const char *func_name() const { return "envelope"; } String *val_str(String *); int get_geometry_type() const; Field::geometry_type get_geometry_type() const; }; class Item_func_point: public Item_geometry_func Loading @@ -111,7 +110,7 @@ class Item_func_point: public Item_geometry_func Item_func_point(Item *a, Item *b, Item *srid): Item_geometry_func(a, b, srid) {} const char *func_name() const { return "point"; } String *val_str(String *); int get_geometry_type() const; Field::geometry_type get_geometry_type() const; }; class Item_func_spatial_decomp: public Item_geometry_func Loading Loading
sql/item.cc +3 −8 Original line number Diff line number Diff line Loading @@ -4399,11 +4399,8 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table) collation.collation); break; // Blob handled outside of case case MYSQL_TYPE_GEOMETRY: return new Field_geom(max_length, maybe_null, name, table, (Field::geometry_type) ((type() == Item::TYPE_HOLDER) ? ((Item_type_holder *)this)->get_geometry_type() : ((Item_geometry_func *)this)->get_geometry_type())); return new Field_geom(max_length, maybe_null, name, table, get_geometry_type()); } } Loading Loading @@ -6524,9 +6521,7 @@ Item_type_holder::Item_type_holder(THD *thd, Item *item) decimals= 0; prev_decimal_int_part= item->decimal_int_part(); if (item->field_type() == MYSQL_TYPE_GEOMETRY) geometry_type= (item->type() == Item::FIELD_ITEM) ? ((Item_field *)item)->get_geometry_type() : (Field::geometry_type)((Item_geometry_func *)item)->get_geometry_type(); geometry_type= item->get_geometry_type(); } Loading
sql/item.h +4 −2 Original line number Diff line number Diff line Loading @@ -870,6 +870,8 @@ class Item { */ virtual bool result_as_longlong() { return FALSE; } bool is_datetime(); virtual Field::geometry_type get_geometry_type() const { return Field::GEOM_GEOMETRY; }; String *check_well_formed_result(String *str); }; Loading Loading @@ -1338,7 +1340,7 @@ class Item_field :public Item_ident int fix_outer_field(THD *thd, Field **field, Item **reference); virtual Item *update_value_transformer(byte *select_arg); void print(String *str); Field::geometry_type get_geometry_type() Field::geometry_type get_geometry_type() const { DBUG_ASSERT(field_type() == MYSQL_TYPE_GEOMETRY); return field->get_geometry_type(); Loading Loading @@ -2640,7 +2642,7 @@ class Item_type_holder: public Item Field *make_field_by_type(TABLE *table); static uint32 display_length(Item *item); static enum_field_types get_real_type(Item *); Field::geometry_type get_geometry_type() { return geometry_type; }; Field::geometry_type get_geometry_type() const { return geometry_type; }; }; Loading
sql/item_geofunc.cc +7 −11 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg) { return new Field_geom(max_length, maybe_null, name, t_arg, (Field::geometry_type) get_geometry_type()); get_geometry_type()); } void Item_geometry_func::fix_length_and_dec() Loading @@ -38,10 +38,6 @@ void Item_geometry_func::fix_length_and_dec() maybe_null= 1; } int Item_geometry_func::get_geometry_type() const { return (int)Field::GEOM_GEOMETRY; } String *Item_func_geometry_from_text::val_str(String *str) { Loading Loading @@ -160,9 +156,9 @@ String *Item_func_geometry_type::val_str(String *str) } int Item_func_envelope::get_geometry_type() const Field::geometry_type Item_func_envelope::get_geometry_type() const { return (int) Field::GEOM_POLYGON; return Field::GEOM_POLYGON; } Loading Loading @@ -190,9 +186,9 @@ String *Item_func_envelope::val_str(String *str) } int Item_func_centroid::get_geometry_type() const Field::geometry_type Item_func_centroid::get_geometry_type() const { return (int) Field::GEOM_POINT; return Field::GEOM_POINT; } Loading Loading @@ -330,9 +326,9 @@ String *Item_func_spatial_decomp_n::val_str(String *str) */ int Item_func_point::get_geometry_type() const Field::geometry_type Item_func_point::get_geometry_type() const { return (int) Field::GEOM_POINT; return Field::GEOM_POINT; } Loading
sql/item_geofunc.h +3 −4 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ class Item_geometry_func: public Item_str_func void fix_length_and_dec(); enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; } Field *tmp_table_field(TABLE *t_arg); virtual int get_geometry_type() const; bool is_null() { (void) val_int(); return null_value; } }; Loading Loading @@ -92,7 +91,7 @@ class Item_func_centroid: public Item_geometry_func Item_func_centroid(Item *a): Item_geometry_func(a) {} const char *func_name() const { return "centroid"; } String *val_str(String *); int get_geometry_type() const; Field::geometry_type get_geometry_type() const; }; class Item_func_envelope: public Item_geometry_func Loading @@ -101,7 +100,7 @@ class Item_func_envelope: public Item_geometry_func Item_func_envelope(Item *a): Item_geometry_func(a) {} const char *func_name() const { return "envelope"; } String *val_str(String *); int get_geometry_type() const; Field::geometry_type get_geometry_type() const; }; class Item_func_point: public Item_geometry_func Loading @@ -111,7 +110,7 @@ class Item_func_point: public Item_geometry_func Item_func_point(Item *a, Item *b, Item *srid): Item_geometry_func(a, b, srid) {} const char *func_name() const { return "point"; } String *val_str(String *); int get_geometry_type() const; Field::geometry_type get_geometry_type() const; }; class Item_func_spatial_decomp: public Item_geometry_func Loading