mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Adding the override
keyword into all classes in the Type_handler hierarchy, for consistency.
This commit is contained in:
parent
3f7659b838
commit
e98f3bcf53
2 changed files with 598 additions and 525 deletions
1071
sql/sql_type.h
1071
sql/sql_type.h
File diff suppressed because it is too large
Load diff
|
@ -346,9 +346,12 @@ public:
|
|||
{ srid= field_srid; }
|
||||
enum_conv_type rpl_conv_type_from(const Conv_source &source,
|
||||
const Relay_log_info *rli,
|
||||
const Conv_param ¶m) const;
|
||||
enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY2; }
|
||||
const Type_handler *type_handler() const
|
||||
const Conv_param ¶m) 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 @@ public:
|
|||
{
|
||||
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 @@ public:
|
|||
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 @@ public:
|
|||
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 @@ public:
|
|||
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"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue