MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mock::FakePartitionHandler Class Reference

The MOCK storage engine does not actually implement partitioning, but we support the Partition_handler interface in order to be able to access tables that are partitioned in the primary engine. More...

#include <ha_mock.h>

Inheritance diagram for mock::FakePartitionHandler:
[legend]

Public Member Functions

 FakePartitionHandler (const handler *engine)
 
void get_dynamic_partition_info (ha_statistics *stat_info, ha_checksum *check_sum, uint part_id) override
 Get dynamic table information from partition. More...
 
void set_part_info (partition_info *, bool) override
 Set the partition info object to be used by the handler. More...
 
enum row_type get_partition_row_type (const dd::Table *, uint) override
 Get partition row type from SE. More...
 
- Public Member Functions inherited from Partition_handler
 Partition_handler ()=default
 
virtual ~Partition_handler ()=default
 
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...
 
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...
 

Private Attributes

const handlerm_engine
 

Detailed Description

The MOCK storage engine does not actually implement partitioning, but we support the Partition_handler interface in order to be able to access tables that are partitioned in the primary engine.

Constructor & Destructor Documentation

◆ FakePartitionHandler()

mock::FakePartitionHandler::FakePartitionHandler ( const handler engine)
inlineexplicit

Member Function Documentation

◆ get_dynamic_partition_info()

void mock::FakePartitionHandler::get_dynamic_partition_info ( ha_statistics stat_info,
ha_checksum check_sum,
uint  part_id 
)
inlineoverridevirtual

Get dynamic table information from partition.

Parameters
[out]stat_infoStatistics struct to fill in.
[out]check_sumCheck sum value to fill in if supported.
[in]part_idPartition 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.

Implements Partition_handler.

◆ get_partition_row_type()

enum row_type mock::FakePartitionHandler::get_partition_row_type ( const dd::Table table,
uint  part_id 
)
inlineoverridevirtual

Get partition row type from SE.

Parameters
tablepartition table
part_idId of partition for which row type to be retrieved
Returns
Partition row type.

Implements Partition_handler.

◆ set_part_info()

void mock::FakePartitionHandler::set_part_info ( partition_info part_info,
bool  early 
)
inlineoverridevirtual

Set the partition info object to be used by the handler.

Parameters
part_infoPartition info to be used by the handler.
earlyTrue if called when part_info only created and parsed, but not setup, checked or fixed.

Implements Partition_handler.

Member Data Documentation

◆ m_engine

const handler* mock::FakePartitionHandler::m_engine
private

The documentation for this class was generated from the following file: