diff options
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 391 |
1 files changed, 204 insertions, 187 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 48552301f55..8b2c42d94bc 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -438,6 +438,9 @@ private: MY_BITMAP m_locked_partitions; /** Stores shared auto_increment etc. */ Partition_share *part_share; + void sum_copy_info(handler *file); + void sum_copy_infos(); + void reset_copy_info() override; /** Temporary storage for new partitions Handler_shares during ALTER */ List<Parts_share_refs> m_new_partitions_share_refs; /** Sorted array of partition ids in descending order of number of rows. */ @@ -470,16 +473,16 @@ public: return NO_CURRENT_PART_ID; } Partition_share *get_part_share() { return part_share; } - handler *clone(const char *name, MEM_ROOT *mem_root); - virtual void set_part_info(partition_info *part_info) + handler *clone(const char *name, MEM_ROOT *mem_root) override; + virtual void set_part_info(partition_info *part_info) override { m_part_info= part_info; 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) { @@ -534,30 +537,29 @@ public: object needed in opening the object in openfrm ------------------------------------------------------------------------- */ - virtual int delete_table(const char *from); - virtual int rename_table(const char *from, const char *to); - virtual int create(const char *name, TABLE *form, - HA_CREATE_INFO *create_info); - virtual int create_partitioning_metadata(const char *name, - const char *old_name, int action_flag); - virtual void update_create_info(HA_CREATE_INFO *create_info); - virtual int change_partitions(HA_CREATE_INFO *create_info, - const char *path, - ulonglong * const copied, - ulonglong * const deleted, - const uchar *pack_frm_data, - size_t pack_frm_len); - virtual int drop_partitions(const char *path); - virtual int rename_partitions(const char *path); - bool get_no_parts(const char *name, uint *num_parts) + int delete_table(const char *from) override; + int rename_table(const char *from, const char *to) override; + int create(const char *name, TABLE *form, + HA_CREATE_INFO *create_info) override; + int create_partitioning_metadata(const char *name, + const char *old_name, int action_flag) + override; + void update_create_info(HA_CREATE_INFO *create_info) override; + int change_partitions(HA_CREATE_INFO *create_info, const char *path, + ulonglong * const copied, ulonglong * const deleted, + const uchar *pack_frm_data, size_t pack_frm_len) + override; + int drop_partitions(const char *path) override; + int rename_partitions(const char *path) override; + bool get_no_parts(const char *, uint *num_parts) override { DBUG_ENTER("ha_partition::get_no_parts"); *num_parts= m_tot_parts; DBUG_RETURN(0); } - virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); - virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info, - uint table_changes); + void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share) override; + bool check_if_incompatible_data(HA_CREATE_INFO *create_info, + uint table_changes) override; void update_part_create_info(HA_CREATE_INFO *create_info, uint part_id) { m_file[part_id]->update_create_info(create_info); @@ -596,7 +598,7 @@ private: bool is_subpart); bool populate_partition_name_hash(); 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); bool init_partition_bitmaps(); void free_partition_bitmaps(); @@ -616,8 +618,8 @@ public: being used for normal queries (not before meta-data changes always. 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); - virtual int close(void); + int open(const char *name, int mode, uint test_if_locked) override; + int close() override; /* ------------------------------------------------------------------------- @@ -632,31 +634,31 @@ public: and these go directly to the handlers supporting transactions ------------------------------------------------------------------------- */ - virtual THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to, - enum thr_lock_type lock_type); - virtual int external_lock(THD * thd, int lock_type); - LEX_CSTRING *engine_name() { return hton_name(partition_ht()); } + THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to, + enum thr_lock_type lock_type) override; + int external_lock(THD * thd, int lock_type) override; + LEX_CSTRING *engine_name() override { return hton_name(partition_ht()); } /* When table is locked a statement is started by calling start_stmt 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) */ - virtual uint lock_count(void) const; + uint lock_count() const override; /* Call to unlock rows not to be updated in transaction */ - virtual void unlock_row(); + void unlock_row() override; /* Check if semi consistent read */ - virtual bool was_semi_consistent_read(); + bool was_semi_consistent_read() override; /* 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, @@ -690,28 +692,28 @@ public: start_bulk_insert and end_bulk_insert is called before and after a number of calls to write_row. */ - virtual int write_row(uchar * buf); - virtual bool start_bulk_update(); - virtual int exec_bulk_update(ha_rows *dup_key_found); - virtual int end_bulk_update(); - virtual int bulk_update_row(const uchar *old_data, const uchar *new_data, - ha_rows *dup_key_found); - virtual int update_row(const uchar * old_data, const uchar * new_data); - virtual int direct_update_rows_init(List<Item> *update_fields); - virtual int pre_direct_update_rows_init(List<Item> *update_fields); - virtual int direct_update_rows(ha_rows *update_rows); - virtual int pre_direct_update_rows(); - virtual bool start_bulk_delete(); - virtual int end_bulk_delete(); - virtual int delete_row(const uchar * buf); - virtual int direct_delete_rows_init(); - virtual int pre_direct_delete_rows_init(); - virtual int direct_delete_rows(ha_rows *delete_rows); - virtual int pre_direct_delete_rows(); - virtual int delete_all_rows(void); - virtual int truncate(); - virtual void start_bulk_insert(ha_rows rows, uint flags); - virtual int end_bulk_insert(); + int write_row(const uchar * buf) override; + bool start_bulk_update() override; + int exec_bulk_update(ha_rows *dup_key_found) override; + int end_bulk_update() override; + int bulk_update_row(const uchar *old_data, const uchar *new_data, + ha_rows *dup_key_found) override; + int update_row(const uchar * old_data, const uchar * new_data) override; + int direct_update_rows_init(List<Item> *update_fields) override; + int pre_direct_update_rows_init(List<Item> *update_fields) override; + int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows) override; + int pre_direct_update_rows() override; + bool start_bulk_delete() override; + int end_bulk_delete() override; + int delete_row(const uchar * buf) override; + int direct_delete_rows_init() override; + int pre_direct_delete_rows_init() override; + int direct_delete_rows(ha_rows *delete_rows) override; + int pre_direct_delete_rows() override; + int delete_all_rows() override; + int truncate() override; + void start_bulk_insert(ha_rows rows, uint flags) override; + int end_bulk_insert() override; private: ha_rows guess_bulk_insert_rows(); void start_part_bulk_insert(THD *thd, uint part_id); @@ -727,7 +729,7 @@ public: */ 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) || error == HA_ERR_NO_PARTITION_FOUND || @@ -762,12 +764,12 @@ public: position it to the start of the table, no need to deallocate and allocate it again */ - virtual int rnd_init(bool scan); - virtual int rnd_end(); - virtual int rnd_next(uchar * buf); - virtual int rnd_pos(uchar * buf, uchar * pos); - virtual int rnd_pos_by_record(uchar *record); - virtual void position(const uchar * record); + int rnd_init(bool scan) override; + int rnd_end() override; + int rnd_next(uchar * buf) override; + int rnd_pos(uchar * buf, uchar * pos) override; + int rnd_pos_by_record(uchar *record) override; + void position(const uchar * record) override; /* ------------------------------------------------------------------------- @@ -801,11 +803,11 @@ public: index_init initializes an index before using it and index_end does any end processing needed. */ - virtual int index_read_map(uchar * buf, const uchar * key, - key_part_map keypart_map, - enum ha_rkey_function find_flag); - virtual int index_init(uint idx, bool sorted); - virtual int index_end(); + int index_read_map(uchar * buf, const uchar * key, + key_part_map keypart_map, + enum ha_rkey_function find_flag) override; + int index_init(uint idx, bool sorted) override; + int index_end() override; /** @breif @@ -813,36 +815,36 @@ public: row if available. If the key value is null, begin at first key of the index. */ - virtual int index_read_idx_map(uchar *buf, uint index, const uchar *key, - key_part_map keypart_map, - enum ha_rkey_function find_flag); + int index_read_idx_map(uchar *buf, uint index, const uchar *key, + key_part_map keypart_map, + enum ha_rkey_function find_flag) override; /* 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. */ - virtual int index_next(uchar * buf); - virtual int index_prev(uchar * buf); - virtual int index_first(uchar * buf); - virtual int index_last(uchar * buf); - virtual int index_next_same(uchar * buf, const uchar * key, uint keylen); + int index_next(uchar * buf) override; + int index_prev(uchar * buf) override; + int index_first(uchar * buf) override; + int index_last(uchar * buf) override; + int index_next_same(uchar * buf, const uchar * key, uint keylen) override; int index_read_last_map(uchar *buf, 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 handler.cc, no storage engine has implemented it so neither 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, - const key_range * end_key, - bool eq_range, bool sorted); - virtual int read_range_next(); + int read_range_first(const key_range * start_key, + const key_range * end_key, + bool eq_range, bool sorted) override; + int read_range_next() override; HANDLER_BUFFER *m_mrr_buffer; @@ -904,20 +906,20 @@ public: RANGE_SEQ_IF *seq, range_seq_t seq_it ); - virtual ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, - void *seq_init_param, - uint n_ranges, uint *bufsz, - uint *mrr_mode, - Cost_estimate *cost); - virtual ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, - uint key_parts, uint *bufsz, - uint *mrr_mode, Cost_estimate *cost); - virtual int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param, - uint n_ranges, uint mrr_mode, - HANDLER_BUFFER *buf); - virtual int multi_range_read_next(range_id_t *range_info); - virtual int multi_range_read_explain_info(uint mrr_mode, char *str, - size_t size); + ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, + void *seq_init_param, + uint n_ranges, uint *bufsz, + uint *mrr_mode, + Cost_estimate *cost) override; + ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, + uint key_parts, uint *bufsz, + uint *mrr_mode, Cost_estimate *cost) override; + int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param, + uint n_ranges, uint mrr_mode, + HANDLER_BUFFER *buf) override; + int multi_range_read_next(range_id_t *range_info) override; + int multi_range_read_explain_info(uint mrr_mode, char *str, size_t size) + override; uint last_part() { return m_last_part; } private: @@ -946,21 +948,20 @@ public: purposes. ------------------------------------------------------------------------- */ - virtual int info(uint); - void get_dynamic_partition_info(PARTITION_STATS *stat_info, - uint part_id); - void set_partitions_to_open(List<String> *partition_names); - int change_partitions_to_open(List<String> *partition_names); + int info(uint) override; + void get_dynamic_partition_info(PARTITION_STATS *stat_info, uint part_id) + override; + void set_partitions_to_open(List<String> *partition_names) override; + int change_partitions_to_open(List<String> *partition_names) override; int open_read_partitions(char *name_buff, size_t name_buff_size); - virtual int extra(enum ha_extra_function operation); - virtual int extra_opt(enum ha_extra_function operation, ulong arg); - virtual int reset(void); - virtual uint count_query_cache_dependant_tables(uint8 *tables_type); - virtual my_bool - register_query_cache_dependant_tables(THD *thd, - Query_cache *cache, - Query_cache_block_table **block, - uint *n); + int extra(enum ha_extra_function operation) override; + int extra_opt(enum ha_extra_function operation, ulong arg) override; + int reset() override; + uint count_query_cache_dependant_tables(uint8 *tables_type) override; + my_bool register_query_cache_dependant_tables(THD *thd, + Query_cache *cache, + Query_cache_block_table **block, + uint *n) override; private: typedef int handler_callback(handler *, void *); @@ -1015,36 +1016,40 @@ public: index-only scanning when performing an ORDER BY query. 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. */ - virtual double scan_time(); + double scan_time() override; + + double key_scan_time(uint inx) override; + + double keyread_time(uint inx, uint ranges, ha_rows rows) override; /* 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. Used by optimiser to calculate cost of using a particular index. */ - virtual ha_rows records_in_range(uint inx, key_range * min_key, - key_range * max_key); + ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key) + override; /* Upper bound of number records returned in scan is sum of all 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 underlying handlers must have the same implementation for it to work. */ - virtual uint8 table_cache_type(); - virtual ha_rows records(); + uint8 table_cache_type() override; + ha_rows records() override; /* Calculate hash value for PARTITION BY KEY tables. */ static uint32 calculate_key_hash_value(Field **field_array); @@ -1062,19 +1067,19 @@ public: Here we must ensure that all handlers use the same index type 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 */ - virtual const char *table_type() const; + const char *table_type() const; /* 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 */ - virtual void print_error(int error, myf errflag); - virtual bool get_error_message(int error, String * buf); + void print_error(int error, myf errflag) override; + bool get_error_message(int error, String * buf) override; /* ------------------------------------------------------------------------- MODULE handler characteristics @@ -1150,10 +1155,6 @@ public: with hidden primary key) (No handler has this limitation currently) - HA_WANTS_PRIMARY_KEY: - Can't define a table without primary key except sequences - (Only InnoDB has this when using innodb_force_primary_key == ON) - HA_STATS_RECORDS_IS_EXACT: Does the counter of records after the info call specify an exact value or not. If it does this flag is set. @@ -1232,7 +1233,7 @@ public: HA_CAN_INSERT_DELAYED, HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is disabled 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 @@ -1290,7 +1291,7 @@ public: must be updated in the row. (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 @@ -1303,7 +1304,8 @@ public: wrapper function for handlerton alter_table_flags, since 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 can handle the data it is about to send. @@ -1311,19 +1313,18 @@ public: 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; - virtual uint max_supported_record_length() const; - virtual uint max_supported_keys() const; - virtual uint max_supported_key_parts() const; - virtual uint max_supported_key_length() const; - virtual uint max_supported_key_part_length() const; - virtual uint min_record_length(uint options) const; + uint max_supported_record_length() const override; + uint max_supported_keys() const override; + uint max_supported_key_parts() const override; + uint max_supported_key_length() const override; + uint max_supported_key_part_length() const override; + uint min_record_length(uint options) const override; /* Primary key is clustered can only be true if all underlying handlers have this feature. */ - virtual bool primary_key_is_clustered() - { return m_pkey_is_clustered; } + bool primary_key_is_clustered() override { return m_pkey_is_clustered; } /* ------------------------------------------------------------------------- @@ -1341,7 +1342,7 @@ public: 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 @@ -1355,15 +1356,15 @@ public: auto_increment_column_changed ------------------------------------------------------------------------- */ - virtual bool need_info_for_auto_inc(); - virtual bool can_use_for_auto_inc_init(); - virtual void get_auto_increment(ulonglong offset, ulonglong increment, - ulonglong nb_desired_values, - ulonglong *first_value, - ulonglong *nb_reserved_values); - virtual void release_auto_increment(); + bool need_info_for_auto_inc() override; + bool can_use_for_auto_inc_init() override; + void get_auto_increment(ulonglong offset, ulonglong increment, + ulonglong nb_desired_values, + ulonglong *first_value, + ulonglong *nb_reserved_values) override; + void release_auto_increment() override; private: - virtual int reset_auto_increment(ulonglong value); + int reset_auto_increment(ulonglong value) override; void update_next_auto_inc_val(); virtual void lock_auto_increment() { @@ -1425,7 +1426,7 @@ public: 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 @@ -1453,20 +1454,20 @@ public: List<FOREIGN_KEY_INFO> *f_key_list) virtual uint referenced_by_foreign_key() */ - virtual bool can_switch_engines(); + bool can_switch_engines() override; /* ------------------------------------------------------------------------- MODULE fulltext index ------------------------------------------------------------------------- */ void ft_close_search(FT_INFO *handler); - virtual int ft_init(); - virtual int pre_ft_init(); - virtual void ft_end(); - virtual int pre_ft_end(); - virtual FT_INFO *ft_init_ext(uint flags, uint inx, String *key); - virtual int ft_read(uchar *buf); - virtual int pre_ft_read(bool use_parallel); + int ft_init() override; + int pre_ft_init() override; + void ft_end() override; + int pre_ft_end() override; + FT_INFO *ft_init_ext(uint flags, uint inx, String *key) override; + int ft_read(uchar *buf) override; + int pre_ft_read(bool use_parallel) override; /* ------------------------------------------------------------------------- @@ -1474,7 +1475,7 @@ public: ------------------------------------------------------------------------- The following method is only used by MyISAM when used as temporary tables in a join. - virtual int restart_rnd_next(uchar *buf, uchar *pos); + int restart_rnd_next(uchar *buf, uchar *pos) override; */ /* @@ -1485,17 +1486,19 @@ public: 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, - Alter_inplace_info *ha_alter_info); - virtual bool prepare_inplace_alter_table(TABLE *altered_table, - Alter_inplace_info *ha_alter_info); - virtual bool inplace_alter_table(TABLE *altered_table, - Alter_inplace_info *ha_alter_info); - virtual bool commit_inplace_alter_table(TABLE *altered_table, - Alter_inplace_info *ha_alter_info, - bool commit); - virtual void notify_table_changed(); + Alter_inplace_info *ha_alter_info) + override; + bool prepare_inplace_alter_table(TABLE *altered_table, + Alter_inplace_info *ha_alter_info) + override; + 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, + bool commit) override; + void notify_table_changed() override; /* ------------------------------------------------------------------------- @@ -1519,24 +1522,24 @@ public: all partitions. ------------------------------------------------------------------------- */ - virtual int optimize(THD* thd, HA_CHECK_OPT *check_opt); - virtual int analyze(THD* thd, HA_CHECK_OPT *check_opt); - virtual int check(THD* thd, HA_CHECK_OPT *check_opt); - virtual int repair(THD* thd, HA_CHECK_OPT *check_opt); - virtual bool check_and_repair(THD *thd); - virtual bool auto_repair(int error) const; - virtual bool is_crashed() const; - virtual int check_for_upgrade(HA_CHECK_OPT *check_opt); + int optimize(THD* thd, HA_CHECK_OPT *check_opt) override; + int analyze(THD* thd, HA_CHECK_OPT *check_opt) override; + int check(THD* thd, HA_CHECK_OPT *check_opt) override; + int repair(THD* thd, HA_CHECK_OPT *check_opt) override; + bool check_and_repair(THD *thd) override; + bool auto_repair(int error) const override; + bool is_crashed() const override; + int check_for_upgrade(HA_CHECK_OPT *check_opt) override; /* ------------------------------------------------------------------------- MODULE condition pushdown ------------------------------------------------------------------------- */ - virtual const COND *cond_push(const COND *cond); - virtual void cond_pop(); - virtual void clear_top_table_fields(); - virtual int info_push(uint info_type, void *info); + const COND *cond_push(const COND *cond) override; + void cond_pop() override; + void clear_top_table_fields() override; + int info_push(uint info_type, void *info) override; private: int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags); @@ -1550,10 +1553,13 @@ public: void append_row_to_str(String &str); public: + int pre_calculate_checksum() override; + int calculate_checksum() override; + /* Enabled keycache for performance reasons, WL#4571 */ - virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt); - virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt); - virtual TABLE_LIST *get_next_global_for_child(); + int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt) override; + int preload_keys(THD* thd, HA_CHECK_OPT* check_opt) override; + TABLE_LIST *get_next_global_for_child() override; /* ------------------------------------------------------------------------- @@ -1562,9 +1568,9 @@ public: Enable/Disable Indexes are only supported by HEAP and MyISAM. ------------------------------------------------------------------------- */ - virtual int disable_indexes(uint mode); - virtual int enable_indexes(uint mode); - virtual int indexes_are_disabled(void); + int disable_indexes(uint mode) override; + int enable_indexes(uint mode) override; + int indexes_are_disabled() override; /* ------------------------------------------------------------------------- @@ -1592,7 +1598,7 @@ public: this can also be done before partition will support a mix of engines, but preferably together with other incompatible API changes. */ - virtual handlerton *partition_ht() const + handlerton *partition_ht() const override { handlerton *h= m_file[0]->ht; for (uint i=1; i < m_tot_parts; i++) @@ -1620,5 +1626,16 @@ public: friend int cmp_key_rowid_part_id(void *ptr, uchar *ref1, uchar *ref2); friend int cmp_key_part_id(void *key_p, uchar *ref1, uchar *ref2); + bool can_convert_string( + const Field_string* field, + const Column_definition& new_field) const override; + + bool can_convert_varstring( + const Field_varstring* field, + const Column_definition& new_field) const override; + + bool can_convert_blob( + const Field_blob* field, + const Column_definition& new_field) const override; }; #endif /* HA_PARTITION_INCLUDED */ |