![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
Class for partitioning specific operations. More...
#include <partition_handler.h>
Public Member Functions | |
| Partition_handler ()=default | |
| virtual | ~Partition_handler ()=default | 
| virtual void | get_dynamic_partition_info (ha_statistics *stat_info, ha_checksum *check_sum, uint part_id)=0 | 
| Get dynamic table information from partition.  More... | |
| virtual int | get_default_num_partitions (HA_CREATE_INFO *info) | 
| Get default number of partitions.  More... | |
| virtual void | set_auto_partitions (partition_info *part_info) | 
| Setup auto partitioning.  More... | |
| virtual bool | get_num_parts (const char *name, uint *num_parts) | 
| Get number of partitions for table in SE.  More... | |
| virtual void | set_part_info (partition_info *part_info, bool early)=0 | 
| Set the partition info object to be used by the handler.  More... | |
| int | truncate_partition (dd::Table *table_def) | 
| Truncate partitions.  More... | |
| int | exchange_partition (uint part_id, dd::Table *part_table_def, dd::Table *swap_table_def) | 
| Exchange partition.  More... | |
| virtual uint | alter_flags (uint flags) const | 
| Alter flags.  More... | |
| virtual enum row_type | get_partition_row_type (const dd::Table *table, uint part_id)=0 | 
| Get partition row type from SE.  More... | |
Private Member Functions | |
| virtual int | truncate_partition_low (dd::Table *) | 
| Truncate partition.  More... | |
| virtual int | exchange_partition_low (uint part_id, dd::Table *part_table_def, dd::Table *swap_table_def) | 
| Exchange partition.  More... | |
| virtual handler * | get_handler () | 
| Return the table handler.  More... | |
Class for partitioning specific operations.
Returned from handler::get_partition_handler().
      
  | 
  default | 
      
  | 
  virtualdefault | 
Alter flags.
Given a set of alter table flags, return which is supported.
| flags | Alter table operation flags. | 
Reimplemented in ha_innopart.
| int Partition_handler::exchange_partition | ( | uint | part_id, | 
| dd::Table * | part_table_def, | ||
| dd::Table * | swap_table_def | ||
| ) | 
Exchange partition.
| [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. | 
| 0 | Success. | 
| != | 0 Error code. | 
      
  | 
  inlineprivatevirtual | 
Exchange partition.
Low-level primitive which implementation to be provided by SE.
Reimplemented in ha_innopart.
      
  | 
  inlinevirtual | 
Get default number of partitions.
Used during creating a partitioned table.
| info | Create info. | 
      
  | 
  pure virtual | 
Get dynamic table information from partition.
| [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. | 
Implemented in ha_innopart.
      
  | 
  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.
Reimplemented in ha_innopart.
      
  | 
  inlinevirtual | 
Get number of partitions for table in SE.
| name | normalized path(same as open) to the table | |
| [out] | num_parts | Number of partitions | 
| false | for success | 
| true | for failure, for example table didn't exist in engine | 
      
  | 
  pure virtual | 
Get partition row type from SE.
| table | partition table | 
| part_id | Id of partition for which row type to be retrieved | 
Implemented in ha_innopart.
      
  | 
  inlinevirtual | 
Setup auto partitioning.
Called for engines with HA_USE_AUTO_PARTITION to setup the partition info object
| [in,out] | part_info | Partition object to setup. | 
      
  | 
  pure virtual | 
Set the partition info object to be used by the handler.
| 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.
| 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.
| [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. | 
| 0 | Success. | 
| != | 0 Error code. | 
      
  | 
  inlineprivatevirtual | 
Truncate partition.
Low-level primitive for handler, implementing Partition_handler::truncate_partition().
Reimplemented in ha_innopart.