MDEV-21693: Fix clang -Winconsistent-missing-override

ha_partition: Remove redundant 'virtual' keywords and add
missing 'override'.

FIXME: handler::table_type() is not declared virtual, yet ha_partition
and ha_sequence are seemingly trying to override it.
This commit is contained in:
Marko Mäkelä 2020-02-28 14:01:27 +02:00
parent f56dd0a12d
commit e837a358b6

View File

@ -3,7 +3,7 @@
/* /*
Copyright (c) 2005, 2012, Oracle and/or its affiliates. Copyright (c) 2005, 2012, Oracle and/or its affiliates.
Copyright (c) 2009, 2013, Monty Program Ab & SkySQL Ab. Copyright (c) 2009, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -431,18 +431,18 @@ private:
/** Stores shared auto_increment etc. */ /** Stores shared auto_increment etc. */
Partition_share *part_share; Partition_share *part_share;
/** Fix spurious -Werror=overloaded-virtual in GCC 9 */ /** Fix spurious -Werror=overloaded-virtual in GCC 9 */
virtual void restore_auto_increment(ulonglong prev_insert_id) virtual void restore_auto_increment(ulonglong prev_insert_id) override
{ {
handler::restore_auto_increment(prev_insert_id); handler::restore_auto_increment(prev_insert_id);
} }
/** Store and restore next_auto_inc_val over duplicate key errors. */ /** Store and restore next_auto_inc_val over duplicate key errors. */
virtual void store_auto_increment() void store_auto_increment() override
{ {
DBUG_ASSERT(part_share); DBUG_ASSERT(part_share);
part_share->prev_auto_inc_val= part_share->next_auto_inc_val; part_share->prev_auto_inc_val= part_share->next_auto_inc_val;
handler::store_auto_increment(); handler::store_auto_increment();
} }
virtual void restore_auto_increment() void restore_auto_increment() override
{ {
DBUG_ASSERT(part_share); DBUG_ASSERT(part_share);
part_share->next_auto_inc_val= part_share->prev_auto_inc_val; part_share->next_auto_inc_val= part_share->prev_auto_inc_val;
@ -450,7 +450,7 @@ private:
} }
void sum_copy_info(handler *file); void sum_copy_info(handler *file);
void sum_copy_infos(); void sum_copy_infos();
void reset_copy_info(); void reset_copy_info() override;
/** Temporary storage for new partitions Handler_shares during ALTER */ /** Temporary storage for new partitions Handler_shares during ALTER */
List<Parts_share_refs> m_new_partitions_share_refs; List<Parts_share_refs> m_new_partitions_share_refs;
/** Sorted array of partition ids in descending order of number of rows. */ /** Sorted array of partition ids in descending order of number of rows. */
@ -483,16 +483,16 @@ public:
return NO_CURRENT_PART_ID; return NO_CURRENT_PART_ID;
} }
Partition_share *get_part_share() { return part_share; } Partition_share *get_part_share() { return part_share; }
handler *clone(const char *name, MEM_ROOT *mem_root); handler *clone(const char *name, MEM_ROOT *mem_root) override;
virtual void set_part_info(partition_info *part_info) virtual void set_part_info(partition_info *part_info) override
{ {
m_part_info= part_info; m_part_info= part_info;
m_is_sub_partitioned= part_info->is_sub_partitioned(); m_is_sub_partitioned= part_info->is_sub_partitioned();
} }
virtual void return_record_by_parent(); void return_record_by_parent() override;
virtual bool vers_can_native(THD *thd) bool vers_can_native(THD *thd) override
{ {
if (thd->lex->part_info) if (thd->lex->part_info)
{ {
@ -551,31 +551,30 @@ public:
object needed in opening the object in openfrm object needed in opening the object in openfrm
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual int delete_table(const char *from); int delete_table(const char *from) override;
virtual int rename_table(const char *from, const char *to); int rename_table(const char *from, const char *to) override;
virtual int create(const char *name, TABLE *form, int create(const char *name, TABLE *form,
HA_CREATE_INFO *create_info); HA_CREATE_INFO *create_info) override;
virtual int create_partitioning_metadata(const char *name, int create_partitioning_metadata(const char *name,
const char *old_name, int action_flag); const char *old_name, int action_flag)
virtual void update_create_info(HA_CREATE_INFO *create_info); override;
virtual char *update_table_comment(const char *comment); void update_create_info(HA_CREATE_INFO *create_info) override;
virtual int change_partitions(HA_CREATE_INFO *create_info, char *update_table_comment(const char *comment) override;
const char *path, int change_partitions(HA_CREATE_INFO *create_info, const char *path,
ulonglong * const copied, ulonglong * const copied, ulonglong * const deleted,
ulonglong * const deleted, const uchar *pack_frm_data, size_t pack_frm_len)
const uchar *pack_frm_data, override;
size_t pack_frm_len); int drop_partitions(const char *path) override;
virtual int drop_partitions(const char *path); int rename_partitions(const char *path) override;
virtual int rename_partitions(const char *path); bool get_no_parts(const char *, uint *num_parts) override
bool get_no_parts(const char *name, uint *num_parts)
{ {
DBUG_ENTER("ha_partition::get_no_parts"); DBUG_ENTER("ha_partition::get_no_parts");
*num_parts= m_tot_parts; *num_parts= m_tot_parts;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share) override;
virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info, bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
uint table_changes); uint table_changes) override;
void update_part_create_info(HA_CREATE_INFO *create_info, uint part_id) void update_part_create_info(HA_CREATE_INFO *create_info, uint part_id)
{ {
m_file[part_id]->update_create_info(create_info); m_file[part_id]->update_create_info(create_info);
@ -614,7 +613,7 @@ private:
bool is_subpart); bool is_subpart);
bool populate_partition_name_hash(); bool populate_partition_name_hash();
Partition_share *get_share(); Partition_share *get_share();
bool set_ha_share_ref(Handler_share **ha_share); bool set_ha_share_ref(Handler_share **ha_share) override;
void fix_data_dir(char* path); void fix_data_dir(char* path);
bool init_partition_bitmaps(); bool init_partition_bitmaps();
void free_partition_bitmaps(); void free_partition_bitmaps();
@ -634,8 +633,8 @@ public:
being used for normal queries (not before meta-data changes always. being used for normal queries (not before meta-data changes always.
If the object was opened it will also be closed before being deleted. If the object was opened it will also be closed before being deleted.
*/ */
virtual int open(const char *name, int mode, uint test_if_locked); int open(const char *name, int mode, uint test_if_locked) override;
virtual int close(void); int close() override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -650,31 +649,31 @@ public:
and these go directly to the handlers supporting transactions and these go directly to the handlers supporting transactions
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to, THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to,
enum thr_lock_type lock_type); enum thr_lock_type lock_type) override;
virtual int external_lock(THD * thd, int lock_type); int external_lock(THD * thd, int lock_type) override;
LEX_CSTRING *engine_name() { return hton_name(partition_ht()); } LEX_CSTRING *engine_name() override { return hton_name(partition_ht()); }
/* /*
When table is locked a statement is started by calling start_stmt When table is locked a statement is started by calling start_stmt
instead of external_lock instead of external_lock
*/ */
virtual int start_stmt(THD * thd, thr_lock_type lock_type); int start_stmt(THD * thd, thr_lock_type lock_type) override;
/* /*
Lock count is number of locked underlying handlers (I assume) Lock count is number of locked underlying handlers (I assume)
*/ */
virtual uint lock_count(void) const; uint lock_count() const override;
/* /*
Call to unlock rows not to be updated in transaction Call to unlock rows not to be updated in transaction
*/ */
virtual void unlock_row(); void unlock_row() override;
/* /*
Check if semi consistent read Check if semi consistent read
*/ */
virtual bool was_semi_consistent_read(); bool was_semi_consistent_read() override;
/* /*
Call to hint about semi consistent read Call to hint about semi consistent read
*/ */
virtual void try_semi_consistent_read(bool); void try_semi_consistent_read(bool) override;
/* /*
NOTE: due to performance and resource issues with many partitions, NOTE: due to performance and resource issues with many partitions,
@ -708,28 +707,28 @@ public:
start_bulk_insert and end_bulk_insert is called before and after a start_bulk_insert and end_bulk_insert is called before and after a
number of calls to write_row. number of calls to write_row.
*/ */
virtual int write_row(const uchar * buf); int write_row(const uchar * buf) override;
virtual bool start_bulk_update(); bool start_bulk_update() override;
virtual int exec_bulk_update(ha_rows *dup_key_found); int exec_bulk_update(ha_rows *dup_key_found) override;
virtual int end_bulk_update(); int end_bulk_update() override;
virtual int bulk_update_row(const uchar *old_data, const uchar *new_data, int bulk_update_row(const uchar *old_data, const uchar *new_data,
ha_rows *dup_key_found); ha_rows *dup_key_found) override;
virtual int update_row(const uchar * old_data, const uchar * new_data); int update_row(const uchar * old_data, const uchar * new_data) override;
virtual int direct_update_rows_init(List<Item> *update_fields); int direct_update_rows_init(List<Item> *update_fields) override;
virtual int pre_direct_update_rows_init(List<Item> *update_fields); int pre_direct_update_rows_init(List<Item> *update_fields) override;
virtual int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows); int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows) override;
virtual int pre_direct_update_rows(); int pre_direct_update_rows() override;
virtual bool start_bulk_delete(); bool start_bulk_delete() override;
virtual int end_bulk_delete(); int end_bulk_delete() override;
virtual int delete_row(const uchar * buf); int delete_row(const uchar * buf) override;
virtual int direct_delete_rows_init(); int direct_delete_rows_init() override;
virtual int pre_direct_delete_rows_init(); int pre_direct_delete_rows_init() override;
virtual int direct_delete_rows(ha_rows *delete_rows); int direct_delete_rows(ha_rows *delete_rows) override;
virtual int pre_direct_delete_rows(); int pre_direct_delete_rows() override;
virtual int delete_all_rows(void); int delete_all_rows() override;
virtual int truncate(); int truncate() override;
virtual void start_bulk_insert(ha_rows rows, uint flags); void start_bulk_insert(ha_rows rows, uint flags) override;
virtual int end_bulk_insert(); int end_bulk_insert() override;
private: private:
ha_rows guess_bulk_insert_rows(); ha_rows guess_bulk_insert_rows();
void start_part_bulk_insert(THD *thd, uint part_id); void start_part_bulk_insert(THD *thd, uint part_id);
@ -745,7 +744,7 @@ public:
*/ */
int truncate_partition(Alter_info *, bool *binlog_stmt); int truncate_partition(Alter_info *, bool *binlog_stmt);
virtual bool is_fatal_error(int error, uint flags) bool is_fatal_error(int error, uint flags) override
{ {
if (!handler::is_fatal_error(error, flags) || if (!handler::is_fatal_error(error, flags) ||
error == HA_ERR_NO_PARTITION_FOUND || error == HA_ERR_NO_PARTITION_FOUND ||
@ -780,12 +779,12 @@ public:
position it to the start of the table, no need to deallocate position it to the start of the table, no need to deallocate
and allocate it again and allocate it again
*/ */
virtual int rnd_init(bool scan); int rnd_init(bool scan) override;
virtual int rnd_end(); int rnd_end() override;
virtual int rnd_next(uchar * buf); int rnd_next(uchar * buf) override;
virtual int rnd_pos(uchar * buf, uchar * pos); int rnd_pos(uchar * buf, uchar * pos) override;
virtual int rnd_pos_by_record(uchar *record); int rnd_pos_by_record(uchar *record) override;
virtual void position(const uchar * record); void position(const uchar * record) override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -819,11 +818,11 @@ public:
index_init initializes an index before using it and index_end does index_init initializes an index before using it and index_end does
any end processing needed. any end processing needed.
*/ */
virtual int index_read_map(uchar * buf, const uchar * key, int index_read_map(uchar * buf, const uchar * key,
key_part_map keypart_map, key_part_map keypart_map,
enum ha_rkey_function find_flag); enum ha_rkey_function find_flag) override;
virtual int index_init(uint idx, bool sorted); int index_init(uint idx, bool sorted) override;
virtual int index_end(); int index_end() override;
/** /**
@breif @breif
@ -831,36 +830,36 @@ public:
row if available. If the key value is null, begin at first key of the row if available. If the key value is null, begin at first key of the
index. index.
*/ */
virtual int index_read_idx_map(uchar *buf, uint index, const uchar *key, int index_read_idx_map(uchar *buf, uint index, const uchar *key,
key_part_map keypart_map, key_part_map keypart_map,
enum ha_rkey_function find_flag); enum ha_rkey_function find_flag) override;
/* /*
These methods are used to jump to next or previous entry in the index These methods are used to jump to next or previous entry in the index
scan. There are also methods to jump to first and last entry. scan. There are also methods to jump to first and last entry.
*/ */
virtual int index_next(uchar * buf); int index_next(uchar * buf) override;
virtual int index_prev(uchar * buf); int index_prev(uchar * buf) override;
virtual int index_first(uchar * buf); int index_first(uchar * buf) override;
virtual int index_last(uchar * buf); int index_last(uchar * buf) override;
virtual int index_next_same(uchar * buf, const uchar * key, uint keylen); int index_next_same(uchar * buf, const uchar * key, uint keylen) override;
int index_read_last_map(uchar *buf, int index_read_last_map(uchar *buf,
const uchar *key, const uchar *key,
key_part_map keypart_map); key_part_map keypart_map) override;
/* /*
read_first_row is virtual method but is only implemented by read_first_row is virtual method but is only implemented by
handler.cc, no storage engine has implemented it so neither handler.cc, no storage engine has implemented it so neither
will the partition handler. will the partition handler.
virtual int read_first_row(uchar *buf, uint primary_key); int read_first_row(uchar *buf, uint primary_key) override;
*/ */
virtual int read_range_first(const key_range * start_key, int read_range_first(const key_range * start_key,
const key_range * end_key, const key_range * end_key,
bool eq_range, bool sorted); bool eq_range, bool sorted) override;
virtual int read_range_next(); int read_range_next() override;
HANDLER_BUFFER *m_mrr_buffer; HANDLER_BUFFER *m_mrr_buffer;
@ -921,20 +920,20 @@ public:
RANGE_SEQ_IF *seq, RANGE_SEQ_IF *seq,
range_seq_t seq_it range_seq_t seq_it
); );
virtual ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
void *seq_init_param, void *seq_init_param,
uint n_ranges, uint *bufsz, uint n_ranges, uint *bufsz,
uint *mrr_mode, uint *mrr_mode,
Cost_estimate *cost); Cost_estimate *cost) override;
virtual ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
uint key_parts, uint *bufsz, uint key_parts, uint *bufsz,
uint *mrr_mode, Cost_estimate *cost); uint *mrr_mode, Cost_estimate *cost) override;
virtual int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param, int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
uint n_ranges, uint mrr_mode, uint n_ranges, uint mrr_mode,
HANDLER_BUFFER *buf); HANDLER_BUFFER *buf) override;
virtual int multi_range_read_next(range_id_t *range_info); int multi_range_read_next(range_id_t *range_info) override;
virtual int multi_range_read_explain_info(uint mrr_mode, char *str, int multi_range_read_explain_info(uint mrr_mode, char *str, size_t size)
size_t size); override;
uint last_part() { return m_last_part; } uint last_part() { return m_last_part; }
private: private:
@ -962,21 +961,20 @@ public:
purposes. purposes.
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual int info(uint); int info(uint) override;
void get_dynamic_partition_info(PARTITION_STATS *stat_info, void get_dynamic_partition_info(PARTITION_STATS *stat_info, uint part_id)
uint part_id); override;
void set_partitions_to_open(List<String> *partition_names); void set_partitions_to_open(List<String> *partition_names) override;
int change_partitions_to_open(List<String> *partition_names); int change_partitions_to_open(List<String> *partition_names) override;
int open_read_partitions(char *name_buff, size_t name_buff_size); int open_read_partitions(char *name_buff, size_t name_buff_size);
virtual int extra(enum ha_extra_function operation); int extra(enum ha_extra_function operation) override;
virtual int extra_opt(enum ha_extra_function operation, ulong arg); int extra_opt(enum ha_extra_function operation, ulong arg) override;
virtual int reset(void); int reset() override;
virtual uint count_query_cache_dependant_tables(uint8 *tables_type); uint count_query_cache_dependant_tables(uint8 *tables_type) override;
virtual my_bool my_bool register_query_cache_dependant_tables(THD *thd,
register_query_cache_dependant_tables(THD *thd,
Query_cache *cache, Query_cache *cache,
Query_cache_block_table **block, Query_cache_block_table **block,
uint *n); uint *n) override;
private: private:
typedef int handler_callback(handler *, void *); typedef int handler_callback(handler *, void *);
@ -1031,40 +1029,40 @@ public:
index-only scanning when performing an ORDER BY query. index-only scanning when performing an ORDER BY query.
Only called from one place in sql_select.cc Only called from one place in sql_select.cc
*/ */
virtual const key_map *keys_to_use_for_scanning(); const key_map *keys_to_use_for_scanning() override;
/* /*
Called in test_quick_select to determine if indexes should be used. Called in test_quick_select to determine if indexes should be used.
*/ */
virtual double scan_time(); double scan_time() override;
virtual double key_scan_time(uint inx); double key_scan_time(uint inx) override;
virtual double keyread_time(uint inx, uint ranges, ha_rows rows); double keyread_time(uint inx, uint ranges, ha_rows rows) override;
/* /*
The next method will never be called if you do not implement indexes. The next method will never be called if you do not implement indexes.
*/ */
virtual double read_time(uint index, uint ranges, ha_rows rows); double read_time(uint index, uint ranges, ha_rows rows) override;
/* /*
For the given range how many records are estimated to be in this range. For the given range how many records are estimated to be in this range.
Used by optimiser to calculate cost of using a particular index. Used by optimiser to calculate cost of using a particular index.
*/ */
virtual ha_rows records_in_range(uint inx, key_range * min_key, ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key)
key_range * max_key); override;
/* /*
Upper bound of number records returned in scan is sum of all Upper bound of number records returned in scan is sum of all
underlying handlers. underlying handlers.
*/ */
virtual ha_rows estimate_rows_upper_bound(); ha_rows estimate_rows_upper_bound() override;
/* /*
table_cache_type is implemented by the underlying handler but all table_cache_type is implemented by the underlying handler but all
underlying handlers must have the same implementation for it to work. underlying handlers must have the same implementation for it to work.
*/ */
virtual uint8 table_cache_type(); uint8 table_cache_type() override;
virtual ha_rows records(); ha_rows records() override;
/* Calculate hash value for PARTITION BY KEY tables. */ /* Calculate hash value for PARTITION BY KEY tables. */
static uint32 calculate_key_hash_value(Field **field_array); static uint32 calculate_key_hash_value(Field **field_array);
@ -1082,19 +1080,19 @@ public:
Here we must ensure that all handlers use the same index type Here we must ensure that all handlers use the same index type
for each index created. for each index created.
*/ */
virtual const char *index_type(uint inx); const char *index_type(uint inx) override;
/* The name of the table type that will be used for display purposes */ /* The name of the table type that will be used for display purposes */
virtual const char *table_type() const; const char *table_type() const;
/* The name of the row type used for the underlying tables. */ /* The name of the row type used for the underlying tables. */
virtual enum row_type get_row_type() const; enum row_type get_row_type() const override;
/* /*
Handler specific error messages Handler specific error messages
*/ */
virtual void print_error(int error, myf errflag); void print_error(int error, myf errflag) override;
virtual bool get_error_message(int error, String * buf); bool get_error_message(int error, String * buf) override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
MODULE handler characteristics MODULE handler characteristics
@ -1248,7 +1246,7 @@ public:
HA_CAN_INSERT_DELAYED, HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is disabled HA_CAN_INSERT_DELAYED, HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is disabled
until further investigated. until further investigated.
*/ */
virtual Table_flags table_flags() const; Table_flags table_flags() const override;
/* /*
This is a bitmap of flags that says how the storage engine This is a bitmap of flags that says how the storage engine
@ -1306,7 +1304,7 @@ public:
must be updated in the row. must be updated in the row.
(InnoDB, MyISAM) (InnoDB, MyISAM)
*/ */
virtual ulong index_flags(uint inx, uint part, bool all_parts) const ulong index_flags(uint inx, uint part, bool all_parts) const override
{ {
/* /*
The following code is not safe if you are using different The following code is not safe if you are using different
@ -1319,7 +1317,8 @@ public:
wrapper function for handlerton alter_table_flags, since wrapper function for handlerton alter_table_flags, since
the ha_partition_hton cannot know all its capabilities the ha_partition_hton cannot know all its capabilities
*/ */
virtual alter_table_operations alter_table_flags(alter_table_operations flags); alter_table_operations alter_table_flags(alter_table_operations flags)
override;
/* /*
unireg.cc will call the following to make sure that the storage engine unireg.cc will call the following to make sure that the storage engine
can handle the data it is about to send. can handle the data it is about to send.
@ -1327,19 +1326,18 @@ public:
The maximum supported values is the minimum of all handlers in the table The maximum supported values is the minimum of all handlers in the table
*/ */
uint min_of_the_max_uint(uint (handler::*operator_func)(void) const) const; uint min_of_the_max_uint(uint (handler::*operator_func)(void) const) const;
virtual uint max_supported_record_length() const; uint max_supported_record_length() const override;
virtual uint max_supported_keys() const; uint max_supported_keys() const override;
virtual uint max_supported_key_parts() const; uint max_supported_key_parts() const override;
virtual uint max_supported_key_length() const; uint max_supported_key_length() const override;
virtual uint max_supported_key_part_length() const; uint max_supported_key_part_length() const override;
virtual uint min_record_length(uint options) const; uint min_record_length(uint options) const override;
/* /*
Primary key is clustered can only be true if all underlying handlers have Primary key is clustered can only be true if all underlying handlers have
this feature. this feature.
*/ */
virtual bool primary_key_is_clustered() bool primary_key_is_clustered() override { return m_pkey_is_clustered; }
{ return m_pkey_is_clustered; }
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -1357,7 +1355,7 @@ public:
to check whether the rest of the reference part is also the same. to check whether the rest of the reference part is also the same.
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual int cmp_ref(const uchar * ref1, const uchar * ref2); int cmp_ref(const uchar * ref1, const uchar * ref2) override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
MODULE auto increment MODULE auto increment
@ -1371,15 +1369,15 @@ public:
auto_increment_column_changed auto_increment_column_changed
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual bool need_info_for_auto_inc(); bool need_info_for_auto_inc() override;
virtual bool can_use_for_auto_inc_init(); bool can_use_for_auto_inc_init() override;
virtual void get_auto_increment(ulonglong offset, ulonglong increment, void get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong nb_desired_values, ulonglong nb_desired_values,
ulonglong *first_value, ulonglong *first_value,
ulonglong *nb_reserved_values); ulonglong *nb_reserved_values) override;
virtual void release_auto_increment(); void release_auto_increment() override;
private: private:
virtual int reset_auto_increment(ulonglong value); int reset_auto_increment(ulonglong value) override;
void update_next_auto_inc_val(); void update_next_auto_inc_val();
virtual void lock_auto_increment() virtual void lock_auto_increment()
{ {
@ -1441,7 +1439,7 @@ public:
This method is a special InnoDB method called before a HANDLER query. This method is a special InnoDB method called before a HANDLER query.
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual void init_table_handle_for_HANDLER(); void init_table_handle_for_HANDLER() override;
/* /*
The remainder of this file defines the handler methods not implemented The remainder of this file defines the handler methods not implemented
@ -1469,20 +1467,20 @@ public:
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
virtual uint referenced_by_foreign_key() virtual uint referenced_by_foreign_key()
*/ */
virtual bool can_switch_engines(); bool can_switch_engines() override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
MODULE fulltext index MODULE fulltext index
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
void ft_close_search(FT_INFO *handler); void ft_close_search(FT_INFO *handler);
virtual int ft_init(); int ft_init() override;
virtual int pre_ft_init(); int pre_ft_init() override;
virtual void ft_end(); void ft_end() override;
virtual int pre_ft_end(); int pre_ft_end() override;
virtual FT_INFO *ft_init_ext(uint flags, uint inx, String *key); FT_INFO *ft_init_ext(uint flags, uint inx, String *key) override;
virtual int ft_read(uchar *buf); int ft_read(uchar *buf) override;
virtual int pre_ft_read(bool use_parallel); int pre_ft_read(bool use_parallel) override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -1490,7 +1488,7 @@ public:
------------------------------------------------------------------------- -------------------------------------------------------------------------
The following method is only used by MyISAM when used as The following method is only used by MyISAM when used as
temporary tables in a join. temporary tables in a join.
virtual int restart_rnd_next(uchar *buf, uchar *pos); int restart_rnd_next(uchar *buf, uchar *pos) override;
*/ */
/* /*
@ -1501,17 +1499,19 @@ public:
They are used for in-place alter table: They are used for in-place alter table:
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual enum_alter_inplace_result enum_alter_inplace_result
check_if_supported_inplace_alter(TABLE *altered_table, check_if_supported_inplace_alter(TABLE *altered_table,
Alter_inplace_info *ha_alter_info); Alter_inplace_info *ha_alter_info)
virtual bool prepare_inplace_alter_table(TABLE *altered_table, override;
Alter_inplace_info *ha_alter_info); bool prepare_inplace_alter_table(TABLE *altered_table,
virtual bool inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info)
Alter_inplace_info *ha_alter_info); override;
virtual bool commit_inplace_alter_table(TABLE *altered_table, bool inplace_alter_table(TABLE *altered_table,
Alter_inplace_info *ha_alter_info) override;
bool commit_inplace_alter_table(TABLE *altered_table,
Alter_inplace_info *ha_alter_info, Alter_inplace_info *ha_alter_info,
bool commit); bool commit) override;
virtual void notify_table_changed(); void notify_table_changed() override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -1535,24 +1535,24 @@ public:
all partitions. all partitions.
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual int optimize(THD* thd, HA_CHECK_OPT *check_opt); int optimize(THD* thd, HA_CHECK_OPT *check_opt) override;
virtual int analyze(THD* thd, HA_CHECK_OPT *check_opt); int analyze(THD* thd, HA_CHECK_OPT *check_opt) override;
virtual int check(THD* thd, HA_CHECK_OPT *check_opt); int check(THD* thd, HA_CHECK_OPT *check_opt) override;
virtual int repair(THD* thd, HA_CHECK_OPT *check_opt); int repair(THD* thd, HA_CHECK_OPT *check_opt) override;
virtual bool check_and_repair(THD *thd); bool check_and_repair(THD *thd) override;
virtual bool auto_repair(int error) const; bool auto_repair(int error) const override;
virtual bool is_crashed() const; bool is_crashed() const override;
virtual int check_for_upgrade(HA_CHECK_OPT *check_opt); int check_for_upgrade(HA_CHECK_OPT *check_opt) override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
MODULE condition pushdown MODULE condition pushdown
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual const COND *cond_push(const COND *cond); const COND *cond_push(const COND *cond) override;
virtual void cond_pop(); void cond_pop() override;
virtual void clear_top_table_fields(); void clear_top_table_fields() override;
virtual int info_push(uint info_type, void *info); int info_push(uint info_type, void *info) override;
private: private:
int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags); int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags);
@ -1566,13 +1566,13 @@ public:
void append_row_to_str(String &str); void append_row_to_str(String &str);
public: public:
virtual int pre_calculate_checksum(); int pre_calculate_checksum() override;
virtual int calculate_checksum(); int calculate_checksum() override;
/* Enabled keycache for performance reasons, WL#4571 */ /* Enabled keycache for performance reasons, WL#4571 */
virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt); int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt) override;
virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt); int preload_keys(THD* thd, HA_CHECK_OPT* check_opt) override;
virtual TABLE_LIST *get_next_global_for_child(); TABLE_LIST *get_next_global_for_child() override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -1581,9 +1581,9 @@ public:
Enable/Disable Indexes are only supported by HEAP and MyISAM. Enable/Disable Indexes are only supported by HEAP and MyISAM.
------------------------------------------------------------------------- -------------------------------------------------------------------------
*/ */
virtual int disable_indexes(uint mode); int disable_indexes(uint mode) override;
virtual int enable_indexes(uint mode); int enable_indexes(uint mode) override;
virtual int indexes_are_disabled(void); int indexes_are_disabled() override;
/* /*
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -1611,7 +1611,7 @@ public:
this can also be done before partition will support a mix of engines, this can also be done before partition will support a mix of engines,
but preferably together with other incompatible API changes. but preferably together with other incompatible API changes.
*/ */
virtual handlerton *partition_ht() const handlerton *partition_ht() const override
{ {
handlerton *h= m_file[0]->ht; handlerton *h= m_file[0]->ht;
for (uint i=1; i < m_tot_parts; i++) for (uint i=1; i < m_tot_parts; i++)