49 "InnoDB : A partitioned table"
50 " is not allowed in a shared tablespace.";
199 const char *part_name,
470 uint part_id)
override;
477 bool eq_range_arg,
bool sorted)
override {
479 eq_range_arg, sorted));
489 [[maybe_unused]])
override {
512 ut_o(
return (
nullptr));
517 Ft_hints *hints [[maybe_unused]])
override {
519 ut_o(
return (
nullptr));
528 uint child_table_name_len [[maybe_unused]],
529 char *child_key_name [[maybe_unused]],
530 uint child_key_name_len [[maybe_unused]])
override {
532 ut_o(
return (
false));
557 uint part_id)
override {
597 bool use_reserved_threads,
598 size_t max_desired_threads)
override;
689 int reset()
override;
789 uchar *new_row)
override;
865 const key_range *end_key,
bool sorted)
override;
899 int sample_init(
void *&scan_ctx,
double sampling_percentage,
901 const bool tablesample)
override;
974 int open(
const char *
name,
int mode, uint test_if_locked,
977 int close()
override;
1027 bool entered =
false;
1040 if (!trx->declared_to_be_inside_innodb) {
1110 bool display_tablespace);
1160 keypart_map, find_flag));
1183 ulint &stat_clustered_index_size,
1184 ulint &stat_sum_of_other_index_sizes,
1185 uint64_t &stat_n_rows)
const;
1187 uint biggest_partition);
Class describing changes to be done by ALTER TABLE.
Definition: handler.h:3525
Helper class for encapsulating new/altered partitions during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTIT...
Definition: handler0alter.cc:8072
A simple bitset wrapper class, which lets you access an existing range of bytes (not owned by it!...
Definition: ut0bitset.h:55
Wrapper for struct ft_hints.
Definition: handler.h:4307
InnoDB partition specific Handler_share.
Definition: ha_innopart.h:62
dict_table_t * get_table_part(uint part_id) const
Return innodb table for given partition.
Definition: ha_innopart.h:106
uint m_index_count
Number of indexes.
Definition: ha_innopart.h:75
uint get_num_parts() const
Get the number of partitions.
Definition: ha_innopart.h:171
uint m_ref_count
Reference count.
Definition: ha_innopart.h:78
void close_table_parts()
Close the table partitions.
Definition: ha_innopart.cc:453
~Ha_innopart_share() override
Definition: ha_innopart.cc:100
void increment_ref_counts()
Increment share and InnoDB tables reference counters.
Definition: ha_innopart.cc:236
dict_table_t ** m_table_parts
Array of all included table definitions (one per partition).
Definition: ha_innopart.h:65
uint m_tot_parts
Total number of partitions.
Definition: ha_innopart.h:72
void set_table_part(uint part_id, dict_table_t *table)
Set innodb table for given partition.
Definition: ha_innopart.h:91
Ha_innopart_share()=default
Disable default constructor.
const TABLE_SHARE * get_table_share() const
Definition: ha_innopart.h:167
dict_index_t * get_index(uint part_id, uint keynr)
Return innodb index for given partition and key number.
Definition: ha_innopart.cc:499
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:266
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:317
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:133
bool has_table_parts() const
Return whether share has opened InnoDB tables for partitions.
Definition: ha_innopart.h:133
dict_index_t ** m_index_mapping
Instead of INNOBASE_SHARE::idx_trans_tbl.
Definition: ha_innopart.h:69
uint get_mysql_key(uint part_id, const dict_index_t *index)
Get MySQL key number corresponding to InnoDB index.
Definition: ha_innopart.cc:528
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:211
TABLE_SHARE * m_table_share
Pointer back to owning TABLE_SHARE.
Definition: ha_innopart.h:81
dict_table_t ** get_table_part_ref(uint part_id)
Get table reference for given partition.
Definition: ha_innopart.h:99
Traverse an index in the leaf page block list order and send records to adapter.
Definition: row0pread-adapter.h:43
handler::Load_init_cbk Init_fn
Definition: row0pread-adapter.h:55
handler::Load_end_cbk End_fn
Definition: row0pread-adapter.h:53
handler::Load_cbk Load_fn
Definition: row0pread-adapter.h:51
Class for partitioning specific operations.
Definition: partition_handler.h:194
Partition_helper is a helper class that implements most generic partitioning functionality such as: t...
Definition: partition_handler.h:390
int ph_index_first(uchar *buf)
Start an index scan from leftmost record and return first record.
Definition: partition_handler.cc:1973
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:1898
int ph_index_prev(uchar *buf)
Read next record when performing index scan backwards.
Definition: partition_handler.cc:2194
int ph_update_row(const uchar *old_data, uchar *new_data)
Update an existing row in the partitioned table.
Definition: partition_handler.cc:558
int ph_write_row(uchar *buf)
INSERT/UPDATE/DELETE functions.
Definition: partition_handler.cc:453
int ph_rnd_init(bool scan)
MODULE full table scan.
Definition: partition_handler.cc:1490
int ph_index_next_same(uchar *buf, uint keylen)
Read next same record.
Definition: partition_handler.cc:2172
int ph_index_last(uchar *buf)
Start an index scan from rightmost record and return first record.
Definition: partition_handler.cc:1996
int ph_rnd_next(uchar *buf)
Read next row during full table scan (scan in random row order).
Definition: partition_handler.cc:1598
int ph_read_range_next()
Read next record in read of a range with start and end key.
Definition: partition_handler.cc:2259
virtual void set_part_info_low(partition_info *part_info, bool early)
Set partition info.
Definition: partition_handler.cc:369
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:803
void ph_position(const uchar *record)
Save position of current row.
Definition: partition_handler.cc:1666
int ph_rnd_end()
End of a table scan.
Definition: partition_handler.cc:1551
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:2080
int ph_index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map)
Read last using key.
Definition: partition_handler.cc:2048
void ph_release_auto_increment()
Release unused auto increment values.
Definition: partition_handler.cc:767
int ph_index_next(uchar *buf)
Read next record in a forward index scan.
Definition: partition_handler.cc:2141
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:2221
int ph_delete_row(const uchar *buf)
Delete an existing row in the partitioned table.
Definition: partition_handler.cc:644
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:2929
Partition specific Handler_share.
Definition: partition_handler.h:104
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:169
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: partition.h:51
Definition: dictionary_client.h:166
The class defining a handle to an InnoDB table.
Definition: ha_innodb.h:94
Table_flags table_flags() const override
Get the table flags to use for the statement.
Definition: ha_innodb.cc:6610
void srv_concurrency_exit()
Leave Innodb, if no more tickets are left.
Definition: ha_innodb.cc:2968
row_prebuilt_t * m_prebuilt
Save CPU time with prebuilt/cached data structures.
Definition: ha_innodb.h:778
int srv_concurrency_enter()
Enter InnoDB engine after checking max allowed threads.
Definition: ha_innodb.cc:2961
int info(uint) override
Returns statistics information of the table to the MySQL interpreter, in various fields of the handle...
Definition: ha_innodb.cc:17811
The class defining a partitioning aware handle to an InnoDB table.
Definition: ha_innopart.h:224
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:10778
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:2231
void set_range_key_part(KEY_PART_INFO *key_part) override
Definition: ha_innopart.h:1098
int rnd_next(uchar *record) override
Protected handler:: functions specific for native InnoDB partitioning.
Definition: ha_innopart.h:1117
Sql_stat_start_parts m_sql_stat_start_parts
sql_stat_start per partition.
Definition: ha_innopart.h:658
Altered_partitions * m_new_partitions
New partitions during ADD/REORG/... PARTITION.
Definition: ha_innopart.h:676
~ha_innopart() override=default
FT_INFO * ft_init_ext(uint flags, uint inx, String *key) override
Initialize FT index scan.
Definition: ha_innopart.h:509
bool m_reuse_mysql_template
Can reuse the template for the previous partition.
Definition: ha_innopart.h:679
bool can_reuse_mysql_template() const override
Can reuse the template.
Definition: ha_innopart.h:1179
void parallel_scan_end(void *parallel_scan_ctx) override
Run the parallel read of data.
Definition: handler0alter.cc:10121
int check(THD *thd, HA_CHECK_OPT *check_opt) override
Checks a partitioned table.
Definition: ha_innopart.cc:3894
int discard_or_import_tablespace(bool discard, dd::Table *table_def) override
Discards or imports an InnoDB tablespace.
Definition: ha_innopart.cc:2829
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:1150
int records(ha_rows *num_rows) override
Total number of rows in all used partitions.
Definition: ha_innopart.cc:3184
void info_low_rec_per_key(const dict_table_t *ib_table, uint64_t max_rows, uint biggest_partition)
Definition: ha_innopart.cc:3821
btr_pcur_t * m_clust_pcur
Original m_prebuilt->clust_pcur.
Definition: ha_innopart.h:673
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:1129
uint32_t calculate_key_hash_value(Field **field_array) override
Definition: ha_innopart.h:539
int enable_indexes(uint mode) override
Enable indexes.
Definition: ha_innopart.h:500
int innobase_initialize_autoinc()
Internally called for initializing auto increment value.
Definition: ha_innopart.cc:622
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:555
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:2949
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:1141
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:2689
handler * get_handler() override
Return the table handler.
Definition: ha_innopart.h:578
btr_pcur_t * m_pcur_parts
persistent cursors per partition.
Definition: ha_innopart.h:661
void clear_blob_heaps()
Clear the blob heaps for all partitions.
Definition: ha_innopart.cc:4210
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:1145
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:3283
static int key_and_rowid_cmp(KEY **key_info, uchar *a, uchar *b)
Compare key and rowid.
Definition: ha_innopart.cc:2886
uint alter_flags(uint flags) const override
Alter flags.
Definition: ha_innopart.h:562
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:1155
int delete_table(const char *name, const dd::Table *dd_table) override
Drop a table.
Definition: ha_innopart.cc:2622
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:10826
byte * m_bitset
byte array for sql_stat_start bitset
Definition: ha_innopart.h:655
ha_rows estimate_rows_upper_bound() override
Gives an UPPER BOUND to the number of rows in a table.
Definition: ha_innopart.cc:3402
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:570
ha_innopart(handlerton *hton, TABLE_SHARE *table_arg)
Construct ha_innopart handler.
Definition: ha_innopart.cc:600
int change_active_index(uint part_id, uint keynr)
Changes the active index of a handle.
Definition: ha_innopart.cc:1720
TABLE * get_table() const override
Definition: ha_innopart.h:1092
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:1125
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:527
void update_partition(uint part_id)
Update active partition.
Definition: ha_innopart.cc:1321
int read_range_next() override
Read next row between two endpoints.
Definition: ha_innopart.h:535
void set_eq_range(bool eq_range_arg) override
Definition: ha_innopart.h:1096
int disable_indexes(uint mode) override
Disable indexes.
Definition: ha_innopart.h:496
int bulk_load_end(THD *thd, void *load_ctx, bool is_error) override
End bulk load operation.
Definition: ha_innopart.cc:4172
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:487
void release_auto_increment() override
Do cleanup for auto increment calculation.
Definition: ha_innopart.h:547
Partition_handler * get_partition_handler() override
Definition: ha_innopart.h:566
int info_low(uint flag, bool is_analyze) override
Updates and return statistics.
Definition: ha_innopart.cc:3502
uint16_t * m_pcur_map
map from part_id to offset in above two arrays.
Definition: ha_innopart.h:667
Table_flags table_flags() const override
Get the table flags to use for the statement.
Definition: ha_innopart.h:543
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:1133
btr_pcur_t * m_pcur
Original m_prebuilt->pcur.
Definition: ha_innopart.h:670
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:1090
ut::unique_ptr< saved_prebuilt_t[]> m_parts
Definition: ha_innopart.h:652
void clear_ins_upd_nodes()
Clear used ins_nodes and upd_nodes.
Definition: ha_innopart.cc:1172
int start_stmt(THD *thd, thr_lock_type lock_type) override
Start statement.
Definition: ha_innopart.cc:3992
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:476
FT_INFO * ft_init_ext_with_hints(uint inx, String *key, Ft_hints *hints) override
Initialize FT index scan.
Definition: ha_innopart.h:515
dict_index_t * innopart_get_index(uint part_id, uint keynr)
Get the index for a handle.
Definition: ha_innopart.cc:1672
void initialize_partitioning(partition_info *part_info, bool early)
Definition: ha_innopart.h:574
int cmp_ref(const uchar *ref1, const uchar *ref2) const override
Compares two 'refs'.
Definition: ha_innopart.cc:4157
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:1156
void set_partition(uint part_id)
Change active partition.
Definition: ha_innopart.cc:1272
void position(const uchar *record) override
Store a reference to the current row to 'ref' field of the handle.
Definition: ha_innopart.h:482
int optimize(THD *thd, HA_CHECK_OPT *check_opt) override
Optimize table.
Definition: ha_innopart.cc:3882
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:10110
dict_index_t * innobase_get_index(uint keynr) override
Get the index for the current partition.
Definition: ha_innopart.cc:1657
int truncate_partition_low(dd::Table *dd_table) override
Delete all rows in the requested partitions.
Definition: ha_innopart.cc:3079
void print_error(int error, myf errflag) override
Print error information.
Definition: ha_innopart.cc:1635
void info_low_table_stats(const dict_table_t *ib_table, ulint &stat_clustered_index_size, ulint &stat_sum_of_other_index_sizes, uint64_t &stat_n_rows) const
Definition: ha_innopart.cc:3871
btr_pcur_t * m_clust_pcur_parts
persistent cluster cursors per partition.
Definition: ha_innopart.h:664
int ft_init() override
Initialize FT index scan.
Definition: ha_innopart.h:504
int parallel_scan_init(void *&scan_ctx, size_t *num_threads, bool use_reserved_threads, size_t max_desired_threads) override
Get number of threads that would be spawned for parallel read.
Definition: handler0alter.cc:10034
int exchange_partition_low(uint part_id, dd::Table *part_table, dd::Table *swap_table) override
Exchange partition.
Definition: handler0alter.cc:10931
int reset() override
Reset state of file to after 'open'.
Definition: ha_innopart.cc:4232
int ft_read(uchar *buf) override
Fetch next result from the FT result set.
Definition: ha_innopart.h:522
uint alter_table_flags(uint flags)
int extra(enum ha_extra_function operation) override
Extra hints from MySQL.
Definition: ha_innopart.cc:2901
int delete_all_rows() override
Delete all rows from the table.
Definition: ha_innopart.h:494
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:2404
Ha_innopart_share * m_part_share
Pointer to Ha_innopart_share on the TABLE_SHARE.
Definition: ha_innopart.h:623
bool is_ignorable_error(int error) override
Can error be ignored.
Definition: ha_innopart.cc:1645
int truncate_impl(const char *name, TABLE *form, dd::Table *table_def)
TRUNCATE an InnoDB partitioned table.
Definition: ha_innopart.cc:2986
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:10747
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:4133
int set_dd_discard_attribute(dd::Table *table_def, bool discard)
Set DD discard attribute for tablespace.
Definition: ha_innopart.cc:2774
int rnd_pos(uchar *record, uchar *pos) override
Get a row from a position.
Definition: ha_innopart.cc:2168
int repair(THD *thd, HA_CHECK_OPT *repair_opt) override
Repair a partitioned table.
Definition: ha_innopart.cc:3939
bool get_eq_range() const override
Definition: ha_innopart.h:1094
void update_create_info(HA_CREATE_INFO *create_info) override
Update create_info.
Definition: ha_innopart.cc:2284
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:1137
Definition: handler.h:4211
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4753
KEY_PART_INFO * range_key_part
Definition: handler.h:4813
bool eq_range
Definition: handler.h:4814
ulonglong Table_flags
Definition: handler.h:4757
THD * ha_thd() const
Definition: handler.cc:2842
TABLE * table
Definition: handler.h:4762
virtual int delete_all_rows()
Delete all rows in a table.
Definition: handler.h:7215
Definition: partition_element.h:108
Definition: partition_info.h:209
A table definition from the master.
Definition: rpl_utility.h:250
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
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:10537
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:10334
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:10471
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:10137
int rnd_next_in_part(uint part_id, uchar *buf) override
Get next row during scan of a specific partition.
Definition: ha_innopart.cc:2139
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:1450
int rnd_end_in_part(uint part_id, bool scan) override
End random read/scan of a specific partition.
Definition: ha_innopart.cc:2132
void destroy_record_priority_queue_for_parts() override
Destroy the ordered record buffer and the priority queue.
Definition: ha_innopart.cc:1608
void copy_cached_row(uchar *buf, const uchar *cached_row) override
Copy a cached MySQL row.
Definition: ha_innopart.cc:116
int index_last_in_part(uint part, uchar *record) override
Return last record in index from a partition.
Definition: ha_innopart.cc:1844
void position_in_last_part(uchar *ref_arg, const uchar *record) override
Return position for cursor in last used partition.
Definition: ha_innopart.cc:2208
void save_auto_increment(ulonglong nr) override
Save currently highest auto increment value.
Definition: ha_innopart.cc:1364
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:2006
int write_row_in_part(uint part_id, uchar *record) override
Write a row in specific partition.
Definition: ha_innopart.cc:1423
int init_record_priority_queue_for_parts(uint used_parts) override
Setup the ordered record buffer and the priority queue.
Definition: ha_innopart.cc:1549
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:1880
int sample_next(void *scan_ctx, uchar *buf) override
Get the next record for sampling.
Definition: ha_innopart.cc:2086
int initialize_auto_increment(bool no_lock) override
Set the autoinc column max value.
Definition: ha_innopart.cc:627
int write_row_in_new_part(uint new_part) override
write row to new partition.
Definition: handler0alter.cc:10715
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:1830
int index_first_in_part(uint part, uchar *record) override
Return first record in index from a partition.
Definition: ha_innopart.cc:1791
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:1972
int delete_row_in_part(uint part_id, const uchar *record) override
Deletes a row in partition.
Definition: ha_innopart.cc:1465
int sample_end(void *scan_ctx) override
End sampling.
Definition: ha_innopart.cc:2103
int rnd_pos_by_record(uchar *record) override
Read row using position using given record to find.
Definition: ha_innopart.cc:4248
bool prepare_for_copy_partitions(Alter_inplace_info *ha_alter_info)
Create the Altered_partitoins object.
Definition: handler0alter.cc:10686
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:1902
int rnd_init_in_part(uint part_id, bool scan) override
Initialize random read/scan of a specific partition.
Definition: ha_innopart.cc:2114
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:1931
int index_prev_in_part(uint part, uchar *record) override
Return previous record in index from a partition.
Definition: ha_innopart.cc:1857
int index_next_in_part(uint part, uchar *record) override
Return next record in index from a partition.
Definition: ha_innopart.cc:1806
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:1921
int close() override
Closes a handle to an InnoDB table.
Definition: ha_innopart.cc:1222
int rnd_init(bool scan) override
Initialize a table scan.
Definition: ha_innopart.h:1015
double scan_time() override
Time estimate for full table scan.
Definition: ha_innopart.cc:3448
int index_end() override
End index cursor.
Definition: ha_innopart.cc:1526
bool was_semi_consistent_read() override
Was the last returned row semi consistent read.
Definition: ha_innopart.cc:1387
int write_row(uchar *record) override
Stores a row in an InnoDB database, to the table specified in this handle.
Definition: ha_innopart.h:1026
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:784
void unlock_row() override
Removes a lock on a row.
Definition: ha_innopart.cc:1410
int index_init(uint index, bool sorted) override
Initializes a handle to use an index.
Definition: ha_innopart.cc:1481
void try_semi_consistent_read(bool yes) override
Try semi consistent read.
Definition: ha_innopart.cc:1398
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:1057
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:4018
int rnd_end() override
Ends a table scan.
Definition: ha_innopart.h:1019
int external_lock(THD *thd, int lock_type) override
Lock/prepare to lock table.
Definition: ha_innopart.cc:4048
int delete_row(const uchar *record) override
Deletes a row given as the parameter.
Definition: ha_innopart.h:1061
Bitset Sql_stat_start_parts
Definition: ha_innopart.h:59
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:55
static constexpr auto PARTITION_IN_SHARED_TABLESPACE
Definition: ha_innopart.h:48
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:569
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1095
my_off_t ha_rows
Definition: my_base.h:1228
ha_extra_function
Definition: my_base.h:185
#define HA_ERR_WRONG_COMMAND
Command not supported.
Definition: my_base.h:928
std::uint32_t ha_checksum
Definition: my_checksum.h:106
Header for compiler-dependent features.
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
static int record
Definition: mysqltest.cc:195
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
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:76
bool index(const std::string &value, const String &search_for, uint32_t *idx)
Definition: contains.h:76
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:943
const char * table_name
Definition: rules_table_service.cc:56
mode
Definition: file_handle.h:61
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:2284
#define HA_INPLACE_CHANGE_PARTITION
Definition: partition_handler.h:77
#define HA_PARTITION_FUNCTION_SUPPORTED
bits in Partition_handler::alter_flags():
Definition: partition_handler.h:76
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Interface between Innobase row operations and MySQL.
#define COMPATIBLE_DATA_NO
Definition: handler.h:854
#define HA_READ_BEFORE_WRITE_REMOVAL
The handler supports read before write removal optimization.
Definition: handler.h:426
#define HA_CAN_REPAIR
Definition: handler.h:384
enum_alter_inplace_result
Return values for check_if_supported_inplace_alter().
Definition: handler.h:207
#define HA_CAN_GEOMETRY
Definition: handler.h:243
#define HA_CAN_FULLTEXT
Definition: handler.h:320
row_type
Definition: handler.h:692
#define HA_DUPLICATE_POS
Definition: handler.h:266
#define HA_CAN_FULLTEXT_EXT
Definition: handler.h:431
enum_sampling_method
Definition: handler.h:723
static bool commit(THD *thd)
Commit the current statement and transaction.
Definition: sql_cmd_srs.cc:152
case opt name
Definition: sslopt-case.h:29
Definition: ft_global.h:72
Definition: handler.h:3966
Struct to hold information about the table that should be created.
Definition: handler.h:3356
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
This structure is shared between different table objects.
Definition: table.h:731
Definition: thr_lock.h:124
Definition: btr0pcur.h:99
Data structure for an index.
Definition: dict0mem.h:1069
Data structure for a database table.
Definition: dict0mem.h:1927
Definition: ha_innopart.h:625
ins_node_t * m_ins_node
saved m_prebuilt->ins_node
Definition: ha_innopart.h:627
mem_heap_t * m_blob_heap
saved m_prebuilt->blob_heap
Definition: ha_innopart.h:633
decltype(row_prebuilt_t::new_rec_lock) m_new_rec_lock
save m_prebuilt->new_rec_lock[] values
Definition: ha_innopart.h:642
ulint m_row_read_type
saved m_prebuilt->row_read_type
Definition: ha_innopart.h:639
upd_node_t * m_upd_node
saved m_prebuilt->upd_node
Definition: ha_innopart.h:630
trx_id_t m_trx_id
saved m_prebuilt->trx_id (which in turn reflects table->def_trx_id)
Definition: ha_innopart.h:636
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2852
Definition: row0ins.h:162
Definition: my_base.h:1212
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:295
std::bitset< LOCK_COUNT > new_rec_lock
normally false; if session is using READ COMMITTED or READ UNCOMMITTED isolation level,...
Definition: row0mysql.h:743
trx_t * trx
current transaction handle
Definition: row0mysql.h:525
Definition: row0upd.h:724
thr_lock_type
Definition: thr_lock.h:51
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
unsigned long int ulint
Definition: univ.i:403
Utilities for bitset operations.
#define ut_error
Abort execution.
Definition: ut0dbg.h:105
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:109
#define ut_o(EXPR)
Opposite of ut_d().
Definition: ut0dbg.h:113
#define ut_d(EXPR)
Debug statement.
Definition: ut0dbg.h:111