Commit e98f3bcf authored by Alexander Barkov's avatar Alexander Barkov

Adding the `override` keyword into all classes in the Type_handler hierarchy, for consistency.

parent 3f7659b8
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -346,9 +346,12 @@ class Field_geom :public Field_blob
{ srid= field_srid; }
enum_conv_type rpl_conv_type_from(const Conv_source &source,
const Relay_log_info *rli,
const Conv_param &param) const;
enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY2; }
const Type_handler *type_handler() const
const Conv_param &param) const override;
enum ha_base_keytype key_type() const override
{
return HA_KEYTYPE_VARBINARY2;
}
const Type_handler *type_handler() const override
{
return m_type_handler;
}
......@@ -360,28 +363,28 @@ class Field_geom :public Field_blob
{
m_type_handler= th;
}
enum_field_types type() const
enum_field_types type() const override
{
return MYSQL_TYPE_GEOMETRY;
}
enum_field_types real_type() const
enum_field_types real_type() const override
{
return MYSQL_TYPE_GEOMETRY;
}
Information_schema_character_attributes
information_schema_character_attributes() const
information_schema_character_attributes() const override
{
return Information_schema_character_attributes();
}
void make_send_field(Send_field *to)
void make_send_field(Send_field *to) override
{
Field_longstr::make_send_field(to);
}
bool can_optimize_range(const Item_bool_func *cond,
const Item *item,
bool is_eq_func) const;
void sql_type(String &str) const;
Copy_func *get_copy_func(const Field *from) const
bool is_eq_func) const override;
void sql_type(String &str) const override;
Copy_func *get_copy_func(const Field *from) const override
{
const Type_handler_geometry *fth=
dynamic_cast<const Type_handler_geometry*>(from->type_handler());
......@@ -389,7 +392,7 @@ class Field_geom :public Field_blob
return get_identical_copy_func();
return do_conv_blob;
}
bool memcpy_field_possible(const Field *from) const
bool memcpy_field_possible(const Field *from) const override
{
const Type_handler_geometry *fth=
dynamic_cast<const Type_handler_geometry*>(from->type_handler());
......@@ -397,17 +400,18 @@ class Field_geom :public Field_blob
m_type_handler->is_binary_compatible_geom_super_type_for(fth) &&
!table->copy_blobs;
}
bool is_equal(const Column_definition &new_field) const;
bool can_be_converted_by_engine(const Column_definition &new_type) const
bool is_equal(const Column_definition &new_field) const override;
bool can_be_converted_by_engine(const Column_definition &new_type)
const override
{
return false; // Override the Field_blob behavior
}
int store(const char *to, size_t length, CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
int store_decimal(const my_decimal *);
uint size_of() const { return sizeof(*this); }
int store(const char *to, size_t length, CHARSET_INFO *charset) override;
int store(double nr) override;
int store(longlong nr, bool unsigned_val) override;
int store_decimal(const my_decimal *) override;
uint size_of() const override{ return sizeof(*this); }
/**
Key length is provided only to support hash joins. (compared byte for byte)
Ex: SELECT .. FROM t1,t2 WHERE t1.field_geom1=t2.field_geom2.
......@@ -415,19 +419,19 @@ class Field_geom :public Field_blob
The comparison is not very relevant, as identical geometry might be
represented differently, but we need to support it either way.
*/
uint32 key_length() const { return packlength; }
uint get_key_image(uchar *buff,uint length, imagetype type_arg);
uint32 key_length() const override{ return packlength; }
uint get_key_image(uchar *buff,uint length, imagetype type_arg) override;
/**
Non-nullable GEOMETRY types cannot have defaults,
but the underlying blob must still be reset.
*/
int reset(void) { return Field_blob::reset() || !maybe_null(); }
bool load_data_set_null(THD *thd);
bool load_data_set_no_data(THD *thd, bool fixed_format);
int reset(void) override{ return Field_blob::reset() || !maybe_null(); }
bool load_data_set_null(THD *thd) override;
bool load_data_set_no_data(THD *thd, bool fixed_format) override;
uint get_srid() const { return srid; }
void print_key_value(String *out, uint32 length)
void print_key_value(String *out, uint32 length) override
{
out->append(STRING_WITH_LEN("unprintable_geometry_value"));
}
......
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