Class for partitioning specific operations.
More...
#include <partition_handler.h>
Class for partitioning specific operations.
Returned from handler::get_partition_handler().
◆ Partition_handler()
Partition_handler::Partition_handler |
( |
| ) |
|
|
default |
◆ ~Partition_handler()
virtual Partition_handler::~Partition_handler |
( |
| ) |
|
|
virtualdefault |
◆ alter_flags()
virtual uint Partition_handler::alter_flags |
( |
uint |
flags | ) |
const |
|
inlinevirtual |
Alter flags.
Given a set of alter table flags, return which is supported.
- Parameters
-
flags | Alter table operation flags. |
- Returns
- Supported alter table flags.
Reimplemented in ha_innopart.
◆ exchange_partition()
int Partition_handler::exchange_partition |
( |
uint |
part_id, |
|
|
dd::Table * |
part_table_def, |
|
|
dd::Table * |
swap_table_def |
|
) |
| |
Exchange partition.
- Parameters
-
[in] | part_id | Id of partition to be exchanged. |
[in,out] | part_table_def | dd::Table object for partitioned table. |
[in,out] | swap_table_def | dd::Table object for non-partitioned table. |
- Note
- Both tables are locked in exclusive mode.
-
Changes to dd::Table object done by this method will be saved to data-dictionary only if storage engine supporting atomic DDL (i.e. with HTON_SUPPORTS_ATOMIC_DDL flag).
- Returns
- Operation status.
- Return values
-
0 | Success. |
!= | 0 Error code. |
◆ exchange_partition_low()
virtual int Partition_handler::exchange_partition_low |
( |
uint |
part_id, |
|
|
dd::Table * |
part_table_def, |
|
|
dd::Table * |
swap_table_def |
|
) |
| |
|
inlineprivatevirtual |
Exchange partition.
Low-level primitive which implementation to be provided by SE.
- See also
- Partition_handler::exchange_partition().
Reimplemented in ha_innopart.
◆ get_default_num_partitions()
virtual int Partition_handler::get_default_num_partitions |
( |
HA_CREATE_INFO * |
info | ) |
|
|
inlinevirtual |
Get default number of partitions.
Used during creating a partitioned table.
- Parameters
-
- Returns
- Number of default partitions.
◆ get_dynamic_partition_info()
virtual void Partition_handler::get_dynamic_partition_info |
( |
ha_statistics * |
stat_info, |
|
|
ha_checksum * |
check_sum, |
|
|
uint |
part_id |
|
) |
| |
|
pure virtual |
Get dynamic table information from partition.
- Parameters
-
[out] | stat_info | Statistics struct to fill in. |
[out] | check_sum | Check sum value to fill in if supported. |
[in] | part_id | Partition to report for. |
- Note
- stat_info and check_sum are initialized by caller. check_sum is only expected to be updated if HA_HAS_CHECKSUM.
Implemented in ha_innopart.
◆ get_handler()
virtual handler * Partition_handler::get_handler |
( |
| ) |
|
|
inlineprivatevirtual |
Return the table handler.
For some partitioning specific functions it is still needed to access the handler directly for transaction handling (mark_trx_read_write()) and to assert correct locking.
- Returns
- handler or NULL if not supported.
Reimplemented in ha_innopart.
◆ get_num_parts()
virtual bool Partition_handler::get_num_parts |
( |
const char * |
name, |
|
|
uint * |
num_parts |
|
) |
| |
|
inlinevirtual |
Get number of partitions for table in SE.
- Parameters
-
| name | normalized path(same as open) to the table |
[out] | num_parts | Number of partitions |
- Return values
-
false | for success |
true | for failure, for example table didn't exist in engine |
◆ get_partition_row_type()
virtual enum row_type Partition_handler::get_partition_row_type |
( |
const dd::Table * |
table, |
|
|
uint |
part_id |
|
) |
| |
|
pure virtual |
Get partition row type from SE.
- Parameters
-
table | partition table |
part_id | Id of partition for which row type to be retrieved |
- Returns
- Partition row type.
Implemented in ha_innopart.
◆ set_auto_partitions()
virtual void Partition_handler::set_auto_partitions |
( |
partition_info * |
part_info | ) |
|
|
inlinevirtual |
Setup auto partitioning.
Called for engines with HA_USE_AUTO_PARTITION to setup the partition info object
- Parameters
-
[in,out] | part_info | Partition object to setup. |
◆ set_part_info()
virtual void Partition_handler::set_part_info |
( |
partition_info * |
part_info, |
|
|
bool |
early |
|
) |
| |
|
pure virtual |
Set the partition info object to be used by the handler.
- Parameters
-
part_info | Partition info to be used by the handler. |
early | True if called when part_info only created and parsed, but not setup, checked or fixed. |
Implemented in ha_innopart.
◆ truncate_partition()
int Partition_handler::truncate_partition |
( |
dd::Table * |
table_def | ) |
|
Truncate partitions.
Truncate all partitions matching table->part_info->read_partitions. Handler level wrapper for truncating partitions, will ensure that mark_trx_read_write() is called and also checks locking assertions.
- Parameters
-
[in,out] | table_def | dd::Table object for the table. Engines which support atomic DDL are allowed to adjust this object. Changes will be saved to the data-dictionary. |
- Returns
- Operation status.
- Return values
-
0 | Success. |
!= | 0 Error code. |
◆ truncate_partition_low()
virtual int Partition_handler::truncate_partition_low |
( |
dd::Table * |
| ) |
|
|
inlineprivatevirtual |
Truncate partition.
Low-level primitive for handler, implementing Partition_handler::truncate_partition().
- See also
- Partition_handler::truncate_partition().
Reimplemented in ha_innopart.
The documentation for this class was generated from the following files: