47 "InnoDB : A partitioned table"
48 " is not allowed in a shared tablespace.";
197 const char *part_name,
468 uint part_id)
override;
473 bool eq_range_arg,
bool sorted)
override {
475 eq_range_arg, sorted));
485 [[maybe_unused]])
override {
508 ut_o(
return (
nullptr));
513 Ft_hints *hints [[maybe_unused]])
override {
515 ut_o(
return (
nullptr));
524 uint child_table_name_len [[maybe_unused]],
525 char *child_key_name [[maybe_unused]],
526 uint child_key_name_len [[maybe_unused]])
override {
528 ut_o(
return (
false));
553 uint part_id)
override {
589 bool use_reserved_threads)
override;
680 int reset()
override;
780 uchar *new_row)
override;
856 const key_range *end_key,
bool sorted)
override;
890 int sample_init(
void *&scan_ctx,
double sampling_percentage,
892 const bool tablesample)
override;
968 int close()
override;
1018 bool entered =
false;
1031 if (!trx->declared_to_be_inside_innodb) {
1101 bool display_tablespace);
1156 keypart_map, find_flag));
Class describing changes to be done by ALTER TABLE.
Definition: handler.h:3136
Helper class for encapsulating new/altered partitions during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTIT...
Definition: handler0alter.cc:8042
A simple bitset wrapper class, whose size can be specified after the object has been defined.
Definition: ut0bitset.h:38
Wrapper for struct ft_hints.
Definition: handler.h:3906
InnoDB partition specific Handler_share.
Definition: ha_innopart.h:60
dict_table_t * get_table_part(uint part_id) const
Return innodb table for given partition.
Definition: ha_innopart.h:104
uint m_index_count
Number of indexes.
Definition: ha_innopart.h:73
uint get_num_parts() const
Get the number of partitions.
Definition: ha_innopart.h:169
uint m_ref_count
Reference count.
Definition: ha_innopart.h:76
void close_table_parts()
Close the table partitions.
Definition: ha_innopart.cc:448
~Ha_innopart_share() override
Definition: ha_innopart.cc:95
void increment_ref_counts()
Increment share and InnoDB tables reference counters.
Definition: ha_innopart.cc:231
dict_table_t ** m_table_parts
Array of all included table definitions (one per partition).
Definition: ha_innopart.h:63
uint m_tot_parts
Total number of partitions.
Definition: ha_innopart.h:70
void set_table_part(uint part_id, dict_table_t *table)
Set innodb table for given partition.
Definition: ha_innopart.h:89
Ha_innopart_share()=default
Disable default constructor.
const TABLE_SHARE * get_table_share() const
Definition: ha_innopart.h:165
dict_index_t * get_index(uint part_id, uint keynr)
Return innodb index for given partition and key number.
Definition: ha_innopart.cc:494
static dict_table_t ** open_table_parts(THD *thd, const TABLE *table, const dd::Table *dd_table, partition_info *part_info, const char *table_name)
Open InnoDB tables for partitions and return them as array.
Definition: ha_innopart.cc:261
bool set_table_parts_and_indexes(partition_info *part_info, dict_table_t **table_parts)
Initialize the share with table and indexes per partition.
Definition: ha_innopart.cc:312
static bool open_one_table_part(dd::cache::Dictionary_client *client, THD *thd, const TABLE *table, const dd::Partition *dd_part, const char *part_name, dict_table_t **part_dict_table)
Open one partition.
Definition: ha_innopart.cc:128
bool has_table_parts() const
Return whether share has opened InnoDB tables for partitions.
Definition: ha_innopart.h:131
dict_index_t ** m_index_mapping
Instead of INNOBASE_SHARE::idx_trans_tbl.
Definition: ha_innopart.h:67
uint get_mysql_key(uint part_id, const dict_index_t *index)
Get MySQL key number corresponding to InnoDB index.
Definition: ha_innopart.cc:523
void set_v_templ(TABLE *table, dict_table_t *ib_table, const char *name)
Set up the virtual column template for partition table, and points all m_table_parts[]->vc_templ to i...
Definition: ha_innopart.cc:206
TABLE_SHARE * m_table_share
Pointer back to owning TABLE_SHARE.
Definition: ha_innopart.h:79
dict_table_t ** get_table_part_ref(uint part_id)
Get table reference for given partition.
Definition: ha_innopart.h:97
Traverse an index in the leaf page block list order and send records to adapter.
Definition: row0pread-adapter.h:42
handler::Load_init_cbk Init_fn
Definition: row0pread-adapter.h:54
handler::Load_end_cbk End_fn
Definition: row0pread-adapter.h:52
handler::Load_cbk Load_fn
Definition: row0pread-adapter.h:50
Class for partitioning specific operations.
Definition: partition_handler.h:193
Partition_helper is a helper class that implements most generic partitioning functionality such as: t...
Definition: partition_handler.h:389
int ph_index_first(uchar *buf)
Start an index scan from leftmost record and return first record.
Definition: partition_handler.cc:1903
int ph_index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
Read one record in an index scan and start an index scan.
Definition: partition_handler.cc:1828
int ph_index_prev(uchar *buf)
Read next record when performing index scan backwards.
Definition: partition_handler.cc:2124
int ph_update_row(const uchar *old_data, uchar *new_data)
Update an existing row in the partitioned table.
Definition: partition_handler.cc:556
int ph_write_row(uchar *buf)
INSERT/UPDATE/DELETE functions.
Definition: partition_handler.cc:451
int ph_rnd_init(bool scan)
MODULE full table scan.
Definition: partition_handler.cc:1426
int ph_index_next_same(uchar *buf, uint keylen)
Read next same record.
Definition: partition_handler.cc:2102
int ph_index_last(uchar *buf)
Start an index scan from rightmost record and return first record.
Definition: partition_handler.cc:1926
int ph_rnd_next(uchar *buf)
Read next row during full table scan (scan in random row order).
Definition: partition_handler.cc:1534
int ph_read_range_next()
Read next record in read of a range with start and end key.
Definition: partition_handler.cc:2187
virtual void set_part_info_low(partition_info *part_info, bool early)
Set partition info.
Definition: partition_handler.cc:367
static uint32 ph_calculate_key_hash_value(Field **field_array)
Calculate key hash value from an null terminated array of fields.
Definition: partition_handler.cc:800
void ph_position(const uchar *record)
Save position of current row.
Definition: partition_handler.cc:1602
int ph_rnd_end()
End of a table scan.
Definition: partition_handler.cc:1487
int ph_index_read_idx_map(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
Read index by key and keymap.
Definition: partition_handler.cc:2010
int ph_index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map)
Read last using key.
Definition: partition_handler.cc:1978
void ph_release_auto_increment()
Release unused auto increment values.
Definition: partition_handler.cc:765
int ph_index_next(uchar *buf)
Read next record in a forward index scan.
Definition: partition_handler.cc:2071
int ph_read_range_first(const key_range *start_key, const key_range *end_key, bool eq_range_arg, bool sorted)
Start a read of one range with start and end key.
Definition: partition_handler.cc:2151
int ph_delete_row(const uchar *buf)
Delete an existing row in the partitioned table.
Definition: partition_handler.cc:642
virtual void get_dynamic_partition_info_low(ha_statistics *stat_info, ha_checksum *check_sum, uint part_id)
Functions matching Partition_handler API.
Definition: partition_handler.cc:2857
Partition specific Handler_share.
Definition: partition_handler.h:103
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Definition: partition.h:50
Definition: dictionary_client.h:148
The class defining a handle to an InnoDB table.
Definition: ha_innodb.h:86
Table_flags table_flags() const override
Get the table flags to use for the statement.
Definition: ha_innodb.cc:6307
void srv_concurrency_exit()
Leave Innodb, if no more tickets are left.
Definition: ha_innodb.cc:2973
row_prebuilt_t * m_prebuilt
Save CPU time with prebuilt/cached data structures.
Definition: ha_innodb.h:648
int srv_concurrency_enter()
Enter InnoDB engine after checking max allowed threads.
Definition: ha_innodb.cc:2966
int info(uint) override
Returns statistics information of the table to the MySQL interpreter, in various fields of the handle...
Definition: ha_innodb.cc:17484
The class defining a partitioning aware handle to an InnoDB table.
Definition: ha_innopart.h:222
bool inplace_alter_partition(Alter_inplace_info *ha_alter_info)
Alter the table structure in-place with operations specified using HA_ALTER_FLAGS and Alter_inplace_i...
Definition: handler0alter.cc:10728
void update_part_elem(partition_element *part_elem, dict_table_t *ib_table, bool display_tablespace)
Fill in data_dir_path and tablespace name from internal data dictionary.
Definition: ha_innopart.cc:2225
void set_range_key_part(KEY_PART_INFO *key_part) override
Definition: ha_innopart.h:1089
int rnd_next(uchar *record) override
Protected handler:: functions specific for native InnoDB partitioning.
Definition: ha_innopart.h:1108
Sql_stat_start_parts m_sql_stat_start_parts
sql_stat_start per partition.
Definition: ha_innopart.h:649
Altered_partitions * m_new_partitions
New partitions during ADD/REORG/... PARTITION.
Definition: ha_innopart.h:667
~ha_innopart() override=default
FT_INFO * ft_init_ext(uint flags, uint inx, String *key) override
Initialize FT index scan.
Definition: ha_innopart.h:505
bool m_reuse_mysql_template
Can reuse the template for the previous partition.
Definition: ha_innopart.h:670
bool can_reuse_mysql_template() const override
Can reuse the template.
Definition: ha_innopart.h:1168
void parallel_scan_end(void *parallel_scan_ctx) override
Run the parallel read of data.
Definition: handler0alter.cc:10085
int check(THD *thd, HA_CHECK_OPT *check_opt) override
Checks a partitioned table.
Definition: ha_innopart.cc:3844
int discard_or_import_tablespace(bool discard, dd::Table *table_def) override
Discards or imports an InnoDB tablespace.
Definition: ha_innopart.cc:2822
int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in the handle ('active_index').
Definition: ha_innopart.h:1146
int records(ha_rows *num_rows) override
Total number of rows in all used partitions.
Definition: ha_innopart.cc:3173
btr_pcur_t * m_clust_pcur
Original m_prebuilt->clust_pcur.
Definition: ha_innopart.h:664
int index_next_same(uchar *record, const uchar *, uint keylen) override
Reads the next row matching to the key value given as the parameter.
Definition: ha_innopart.h:1125
uint32_t calculate_key_hash_value(Field **field_array) override
Definition: ha_innopart.h:535
int enable_indexes(uint mode) override
Enable indexes.
Definition: ha_innopart.h:496
int innobase_initialize_autoinc()
Internally called for initializing auto increment value.
Definition: ha_innopart.cc:617
void get_dynamic_partition_info(ha_statistics *stat_info, ha_checksum *check_sum, uint part_id) override
Implementing Partition_handler interface.
Definition: ha_innopart.h:551
enum row_type get_partition_row_type(const dd::Table *partition_table, uint part_id) override
Get partition row type from SE.
Definition: ha_innopart.cc:2938
int index_last(uchar *record) override
Positions a cursor on the last record in an index and reads the corresponding row to buf.
Definition: ha_innopart.h:1137
int rename_table(const char *from, const char *to, const dd::Table *from_table, dd::Table *to_table) override
Rename a table.
Definition: ha_innopart.cc:2682
handler * get_handler() override
Return the table handler.
Definition: ha_innopart.h:574
btr_pcur_t * m_pcur_parts
persistent cursors per partition.
Definition: ha_innopart.h:652
void clear_blob_heaps()
Clear the blob heaps for all partitions.
Definition: ha_innopart.cc:4122
int index_read_last_map(uchar *record, const uchar *key, key_part_map keypart_map) override
The following functions works like index_read, but it find the last row with the current key value or...
Definition: ha_innopart.h:1141
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key) override
Estimates the number of index records in a range.
Definition: ha_innopart.cc:3256
static int key_and_rowid_cmp(KEY **key_info, uchar *a, uchar *b)
Compare key and rowid.
Definition: ha_innopart.cc:2879
uint alter_flags(uint flags) const override
Alter flags.
Definition: ha_innopart.h:558
handler * clone(const char *name, MEM_ROOT *mem_root) override
Clone this handler, used when needing more than one cursor to the same table.
Definition: ha_innopart.cc:1148
int delete_table(const char *name, const dd::Table *dd_table) override
Drop a table.
Definition: ha_innopart.cc:2615
bool commit_inplace_alter_partition(TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit, const dd::Table *old_dd_tab, dd::Table *new_dd_tab)
Prepare to commit or roll back ALTER TABLE...ALGORITHM=INPLACE.
Definition: handler0alter.cc:10776
byte * m_bitset
byte array for sql_stat_start bitset
Definition: ha_innopart.h:646
ha_rows estimate_rows_upper_bound() override
Gives an UPPER BOUND to the number of rows in a table.
Definition: ha_innopart.cc:3375
void set_part_info(partition_info *part_info, bool early) override
Set the partition info object to be used by the handler.
Definition: ha_innopart.h:566
ha_innopart(handlerton *hton, TABLE_SHARE *table_arg)
Construct ha_innopart handler.
Definition: ha_innopart.cc:595
int change_active_index(uint part_id, uint keynr)
Changes the active index of a handle.
Definition: ha_innopart.cc:1714
TABLE * get_table() const override
Definition: ha_innopart.h:1083
int index_next(uchar *record) override
Reads the next row from a cursor, which must have previously been positioned using index_read.
Definition: ha_innopart.h:1121
bool get_foreign_dup_key(char *child_table_name, uint child_table_name_len, char *child_key_name, uint child_key_name_len) override
Retrieves the names of the table and the key for which there was a duplicate entry in the case of HA_...
Definition: ha_innopart.h:523
void update_partition(uint part_id)
Update active partition.
Definition: ha_innopart.cc:1314
int read_range_next() override
Read next row between two endpoints.
Definition: ha_innopart.h:531
void set_eq_range(bool eq_range_arg) override
Definition: ha_innopart.h:1087
int disable_indexes(uint mode) override
Disable indexes.
Definition: ha_innopart.h:492
int records_from_index(ha_rows *num_rows, uint) override
Number of rows in table counted using the secondary index chosen by optimizer.
Definition: ha_innopart.h:1116
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override
Part of old, deprecated in-place ALTER API.
Definition: ha_innopart.h:483
void release_auto_increment() override
Do cleanup for auto increment calculation.
Definition: ha_innopart.h:543
Partition_handler * get_partition_handler() override
Definition: ha_innopart.h:562
int info_low(uint flag, bool is_analyze) override
Updates and return statistics.
Definition: ha_innopart.cc:3468
uint16_t * m_pcur_map
map from part_id to offset in above two arrays.
Definition: ha_innopart.h:658
Table_flags table_flags() const override
Get the table flags to use for the statement.
Definition: ha_innopart.h:539
int index_prev(uchar *record) override
Reads the previous row from a cursor, which must have previously been positioned using index_read.
Definition: ha_innopart.h:1129
btr_pcur_t * m_pcur
Original m_prebuilt->pcur.
Definition: ha_innopart.h:661
THD * get_thd() const override
Access methods to protected areas in handler to avoid adding friend class Partition_helper in class h...
Definition: ha_innopart.h:1081
ut::unique_ptr< saved_prebuilt_t[]> m_parts
Definition: ha_innopart.h:643
void clear_ins_upd_nodes()
Clear used ins_nodes and upd_nodes.
Definition: ha_innopart.cc:1165
int start_stmt(THD *thd, thr_lock_type lock_type) override
Start statement.
Definition: ha_innopart.cc:3942
int read_range_first(const key_range *start_key, const key_range *end_key, bool eq_range_arg, bool sorted) override
Read first row between two ranges.
Definition: ha_innopart.h:472
FT_INFO * ft_init_ext_with_hints(uint inx, String *key, Ft_hints *hints) override
Initialize FT index scan.
Definition: ha_innopart.h:511
dict_index_t * innopart_get_index(uint part_id, uint keynr)
Get the index for a handle.
Definition: ha_innopart.cc:1668
void initialize_partitioning(partition_info *part_info, bool early)
Definition: ha_innopart.h:570
int cmp_ref(const uchar *ref1, const uchar *ref2) const override
Compares two 'refs'.
Definition: ha_innopart.cc:4107
int index_read_idx_map(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in argument.
Definition: ha_innopart.h:1152
void set_partition(uint part_id)
Change active partition.
Definition: ha_innopart.cc:1265
void position(const uchar *record) override
Store a reference to the current row to 'ref' field of the handle.
Definition: ha_innopart.h:478
int optimize(THD *thd, HA_CHECK_OPT *check_opt) override
Optimize table.
Definition: ha_innopart.cc:3832
int parallel_scan(void *scan_ctx, void **thread_ctxs, Reader::Init_fn init_fn, Reader::Load_fn load_fn, Reader::End_fn end_fn) override
Start parallel read of data.
Definition: handler0alter.cc:10074
int parallel_scan_init(void *&scan_ctx, size_t *num_threads, bool use_reserved_threads) override
Get number of threads that would be spawned for parallel read.
Definition: handler0alter.cc:10003
dict_index_t * innobase_get_index(uint keynr) override
Get the index for the current partition.
Definition: ha_innopart.cc:1653
int truncate_partition_low(dd::Table *dd_table) override
Delete all rows in the requested partitions.
Definition: ha_innopart.cc:3068
void print_error(int error, myf errflag) override
Print error information.
Definition: ha_innopart.cc:1631
btr_pcur_t * m_clust_pcur_parts
persistent cluster cursors per partition.
Definition: ha_innopart.h:655
int ft_init() override
Initialize FT index scan.
Definition: ha_innopart.h:500
int exchange_partition_low(uint part_id, dd::Table *part_table, dd::Table *swap_table) override
Exchange partition.
Definition: handler0alter.cc:10881
int reset() override
Reset state of file to after 'open'.
Definition: ha_innopart.cc:4144
int ft_read(uchar *buf) override
Fetch next result from the FT result set.
Definition: ha_innopart.h:518
uint alter_table_flags(uint flags)
int extra(enum ha_extra_function operation) override
Extra hints from MySQL.
Definition: ha_innopart.cc:2894
int delete_all_rows() override
Delete all rows from the table.
Definition: ha_innopart.h:490
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Creates a new table to an InnoDB database.
Definition: ha_innopart.cc:2398
Ha_innopart_share * m_part_share
Pointer to Ha_innopart_share on the TABLE_SHARE.
Definition: ha_innopart.h:614
bool is_ignorable_error(int error) override
Can error be ignored.
Definition: ha_innopart.cc:1641
int truncate_impl(const char *name, TABLE *form, dd::Table *table_def)
TRUNCATE an InnoDB partitioned table.
Definition: ha_innopart.cc:2975
int next_partition_index()
Move to next partition and set its index.
bool prepare_inplace_alter_partition(TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_dd_tab, dd::Table *new_dd_tab)
Allows InnoDB to update internal structures with concurrent writes blocked (given that check_if_suppo...
Definition: handler0alter.cc:10697
void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong *first_value, ulonglong *nb_reserved_values) override
Get the current auto_increment value.
Definition: ha_innopart.cc:4083
int set_dd_discard_attribute(dd::Table *table_def, bool discard)
Set DD discard attribute for tablespace.
Definition: ha_innopart.cc:2767
int rnd_pos(uchar *record, uchar *pos) override
Get a row from a position.
Definition: ha_innopart.cc:2162
int repair(THD *thd, HA_CHECK_OPT *repair_opt) override
Repair a partitioned table.
Definition: ha_innopart.cc:3889
bool get_eq_range() const override
Definition: ha_innopart.h:1085
void update_create_info(HA_CREATE_INFO *create_info) override
Update create_info.
Definition: ha_innopart.cc:2278
int index_first(uchar *record) override
Positions a cursor on the first record in an index and reads the corresponding row to buf.
Definition: ha_innopart.h:1133
Definition: handler.h:3817
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4354
KEY_PART_INFO * range_key_part
Definition: handler.h:4413
bool eq_range
Definition: handler.h:4414
ulonglong Table_flags
Definition: handler.h:4358
THD * ha_thd() const
Definition: handler.cc:2648
TABLE * table
Definition: handler.h:4362
virtual int delete_all_rows()
Delete all rows in a table.
Definition: handler.h:6646
Definition: partition_element.h:107
Definition: partition_info.h:208
A table definition from the master.
Definition: rpl_utility.h:247
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
bool commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit, const dd::Table *old_table_def, dd::Table *new_table_def) override
Commit or rollback.
Definition: handler0alter.cc:10487
bool prepare_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def) override
Prepare in-place ALTER for table.
Definition: handler0alter.cc:10284
bool inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def) override
Alter the table structure in-place.
Definition: handler0alter.cc:10421
enum_alter_inplace_result check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_info *ha_alter_info) override
Check if InnoDB supports a particular alter table in-place.
Definition: handler0alter.cc:10101
int rnd_next_in_part(uint part_id, uchar *buf) override
Get next row during scan of a specific partition.
Definition: ha_innopart.cc:2133
int update_row_in_part(uint part_id, const uchar *old_row, uchar *new_row) override
Update a row in partition.
Definition: ha_innopart.cc:1443
int rnd_end_in_part(uint part_id, bool scan) override
End random read/scan of a specific partition.
Definition: ha_innopart.cc:2126
void destroy_record_priority_queue_for_parts() override
Destroy the ordered record buffer and the priority queue.
Definition: ha_innopart.cc:1604
void copy_cached_row(uchar *buf, const uchar *cached_row) override
Copy a cached MySQL row.
Definition: ha_innopart.cc:111
int index_last_in_part(uint part, uchar *record) override
Return last record in index from a partition.
Definition: ha_innopart.cc:1838
void position_in_last_part(uchar *ref_arg, const uchar *record) override
Return position for cursor in last used partition.
Definition: ha_innopart.cc:2202
void save_auto_increment(ulonglong nr) override
Save currently highest auto increment value.
Definition: ha_innopart.cc:1357
int sample_init(void *&scan_ctx, double sampling_percentage, int sampling_seed, enum_sampling_method sampling_method, const bool tablesample) override
Initialize sampling.
Definition: ha_innopart.cc:2000
int write_row_in_part(uint part_id, uchar *record) override
Write a row in specific partition.
Definition: ha_innopart.cc:1416
int init_record_priority_queue_for_parts(uint used_parts) override
Setup the ordered record buffer and the priority queue.
Definition: ha_innopart.cc:1545
int index_read_map_in_part(uint part, uchar *record, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Start index scan and return first record from a partition.
Definition: ha_innopart.cc:1874
int sample_next(void *scan_ctx, uchar *buf) override
Get the next record for sampling.
Definition: ha_innopart.cc:2080
int initialize_auto_increment(bool no_lock) override
Set the autoinc column max value.
Definition: ha_innopart.cc:622
int write_row_in_new_part(uint new_part) override
write row to new partition.
Definition: handler0alter.cc:10665
int index_next_same_in_part(uint part, uchar *record, const uchar *key, uint length) override
Return next same record in index from a partition.
Definition: ha_innopart.cc:1824
int index_first_in_part(uint part, uchar *record) override
Return first record in index from a partition.
Definition: ha_innopart.cc:1785
int read_range_next_in_part(uint part, uchar *record) override
Return next record in index range scan from a partition.
Definition: ha_innopart.cc:1966
int delete_row_in_part(uint part_id, const uchar *record) override
Deletes a row in partition.
Definition: ha_innopart.cc:1458
int sample_end(void *scan_ctx) override
End sampling.
Definition: ha_innopart.cc:2097
int rnd_pos_by_record(uchar *record) override
Read row using position using given record to find.
Definition: ha_innopart.cc:4160
bool prepare_for_copy_partitions(Alter_inplace_info *ha_alter_info)
Create the Altered_partitoins object.
Definition: handler0alter.cc:10636
int index_read_idx_map_in_part(uint part, uchar *record, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Start index scan and return first record from a partition.
Definition: ha_innopart.cc:1896
int rnd_init_in_part(uint part_id, bool scan) override
Initialize random read/scan of a specific partition.
Definition: ha_innopart.cc:2108
int read_range_first_in_part(uint part, uchar *record, const key_range *start_key, const key_range *end_key, bool sorted) override
Start index scan and return first record from a partition.
Definition: ha_innopart.cc:1925
int index_prev_in_part(uint part, uchar *record) override
Return previous record in index from a partition.
Definition: ha_innopart.cc:1851
int index_next_in_part(uint part, uchar *record) override
Return next record in index from a partition.
Definition: ha_innopart.cc:1800
int index_read_last_map_in_part(uint part, uchar *record, const uchar *key, key_part_map keypart_map) override
Return last matching record in index from a partition.
Definition: ha_innopart.cc:1915
int close() override
Closes a handle to an InnoDB table.
Definition: ha_innopart.cc:1215
int rnd_init(bool scan) override
Initialize a table scan.
Definition: ha_innopart.h:1006
double scan_time() override
Time estimate for full table scan.
Definition: ha_innopart.cc:3421
int index_end() override
End index cursor.
Definition: ha_innopart.cc:1522
bool was_semi_consistent_read() override
Was the last returned row semi consistent read.
Definition: ha_innopart.cc:1380
int write_row(uchar *record) override
Stores a row in an InnoDB database, to the table specified in this handle.
Definition: ha_innopart.h:1017
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Open an InnoDB table.
Definition: ha_innopart.cc:779
void unlock_row() override
Removes a lock on a row.
Definition: ha_innopart.cc:1403
int index_init(uint index, bool sorted) override
Initializes a handle to use an index.
Definition: ha_innopart.cc:1474
void try_semi_consistent_read(bool yes) override
Try semi consistent read.
Definition: ha_innopart.cc:1391
int update_row(const uchar *old_record, uchar *new_record) override
Updates a row given as a parameter to a new value.
Definition: ha_innopart.h:1048
THR_LOCK_DATA ** store_lock(THD *thd, THR_LOCK_DATA **to, thr_lock_type lock_type) override
Function to store lock for all partitions in native partitioned table.
Definition: ha_innopart.cc:3968
int rnd_end() override
Ends a table scan.
Definition: ha_innopart.h:1010
int external_lock(THD *thd, int lock_type) override
Lock/prepare to lock table.
Definition: ha_innopart.cc:3998
int delete_row(const uchar *record) override
Deletes a row given as the parameter.
Definition: ha_innopart.h:1052
Bitset Sql_stat_start_parts
Definition: ha_innopart.h:57
const handler::Table_flags HA_INNOPART_DISABLED_TABLE_FLAGS
HA_DUPLICATE_POS and HA_READ_BEFORE_WRITE_REMOVAL is not set from ha_innobase, but cannot yet be supp...
Definition: ha_innopart.h:53
static constexpr auto PARTITION_IN_SHARED_TABLESPACE
Definition: ha_innopart.h:46
const char * partition_get_tablespace(const char *tablespace, const partition_element *part, const partition_element *sub_part)
Get explicit specified tablespace for one (sub)partition, checking from lowest level.
Definition: ha_innopart.cc:564
static int flags[50]
Definition: hp_test1.cc:39
static int flag
Definition: hp_test1.cc:39
ha_rkey_function
Definition: my_base.h:77
ulong key_part_map
Definition: my_base.h:1006
my_off_t ha_rows
Definition: my_base.h:1139
ha_extra_function
Definition: my_base.h:183
#define HA_ERR_WRONG_COMMAND
Command not supported.
Definition: my_base.h:839
std::uint32_t ha_checksum
Definition: my_checksum.h:105
Header for compiler-dependent features.
int myf
Definition: my_inttypes.h:93
unsigned long long int ulonglong
Definition: my_inttypes.h:55
unsigned char uchar
Definition: my_inttypes.h:51
Definition: buf0block_hint.cc:29
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:909
const char * table_name
Definition: rules_table_service.cc:55
mode
Definition: file_handle.h:59
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2436
#define HA_INPLACE_CHANGE_PARTITION
Definition: partition_handler.h:76
#define HA_PARTITION_FUNCTION_SUPPORTED
bits in Partition_handler::alter_flags():
Definition: partition_handler.h:75
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Interface between Innobase row operations and MySQL.
#define COMPATIBLE_DATA_NO
Definition: handler.h:820
#define HA_READ_BEFORE_WRITE_REMOVAL
The handler supports read before write removal optimization.
Definition: handler.h:410
#define HA_CAN_REPAIR
Definition: handler.h:368
enum_alter_inplace_result
Return values for check_if_supported_inplace_alter().
Definition: handler.h:196
#define HA_CAN_GEOMETRY
Definition: handler.h:227
#define HA_CAN_FULLTEXT
Definition: handler.h:304
row_type
Definition: handler.h:675
#define HA_DUPLICATE_POS
Definition: handler.h:250
#define HA_CAN_FULLTEXT_EXT
Definition: handler.h:415
enum_sampling_method
Definition: handler.h:705
static bool commit(THD *thd)
Commit the current statement and transaction.
Definition: sql_cmd_srs.cc:151
case opt name
Definition: sslopt-case.h:32
Definition: ft_global.h:71
Definition: handler.h:3572
Definition: handler.h:2987
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
This structure is shared between different table objects.
Definition: table.h:688
Definition: thr_lock.h:123
Definition: btr0pcur.h:98
Data structure for an index.
Definition: dict0mem.h:1045
Data structure for a database table.
Definition: dict0mem.h:1908
Definition: ha_innopart.h:616
ins_node_t * m_ins_node
saved m_prebuilt->ins_node
Definition: ha_innopart.h:618
mem_heap_t * m_blob_heap
saved m_prebuilt->blob_heap
Definition: ha_innopart.h:624
decltype(row_prebuilt_t::new_rec_lock) m_new_rec_lock
save m_prebuilt->new_rec_lock[] values
Definition: ha_innopart.h:633
ulint m_row_read_type
saved m_prebuilt->row_read_type
Definition: ha_innopart.h:630
upd_node_t * m_upd_node
saved m_prebuilt->upd_node
Definition: ha_innopart.h:621
trx_id_t m_trx_id
saved m_prebuilt->trx_id (which in turn reflects table->def_trx_id)
Definition: ha_innopart.h:627
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2594
Definition: row0ins.h:161
Definition: my_base.h:1123
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:301
Definition: mi_test3.cc:54
std::bitset< LOCK_COUNT > new_rec_lock
normally false; if session is using READ COMMITTED or READ UNCOMMITTED isolation level,...
Definition: row0mysql.h:761
trx_t * trx
current transaction handle
Definition: row0mysql.h:522
Definition: row0upd.h:700
thr_lock_type
Definition: thr_lock.h:50
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:137
unsigned int uint
Definition: uca-dump.cc:29
unsigned long int ulint
Definition: univ.i:407
Utilities for bitset operations.
#define ut_error
Abort execution.
Definition: ut0dbg.h:64
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:68
#define ut_o(EXPR)
Opposite of ut_d().
Definition: ut0dbg.h:72
#define ut_d(EXPR)
Debug statement.
Definition: ut0dbg.h:70