MySQL 9.1.0
Source Code Documentation
Altered_partitions Class Reference

Helper class for encapsulating new/altered partitions during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTITION. More...

Public Member Functions

 Altered_partitions (uint parts)
 Constructor. More...
 
 ~Altered_partitions ()
 Destructor. More...
 
bool initialize ()
 Initialize the object. More...
 
void set_part (ulint new_part_id, dict_table_t *part)
 Open and set currently used partition. More...
 
dict_table_tpart (uint part_id)
 Get lower level internal table object for partition. More...
 
void prepare_write (row_prebuilt_t *prebuilt, uint new_part_id) const
 To write a row, set up prebuilt for using a specified partition. More...
 
void finish_write (row_prebuilt_t *prebuilt, uint new_part_id)
 After a write, update cached values for a partition from prebuilt. More...
 

Private Attributes

dict_table_t ** m_new_table_parts
 New partitions created during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTITION. More...
 
ins_node_t ** m_ins_nodes
 Insert nodes per partition. More...
 
bytem_bitset
 bytes for sql_stat_start bitset More...
 
Sql_stat_start_parts m_sql_stat_start
 sql_stat_start per partition More...
 
trx_id_tm_trx_ids
 Trx id per partition. More...
 
size_t m_num_new_parts
 Number of new partitions. More...
 

Detailed Description

Helper class for encapsulating new/altered partitions during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTITION.

Here as many partition slots as in new table would be created, it's OK for ADD/COALESCE PARTITION, however more partition slots would probably be created for REORGANIZE PARTITION. Considering that it's easy to get table in this way, it's still OK.

Constructor & Destructor Documentation

◆ Altered_partitions()

Altered_partitions::Altered_partitions ( uint  parts)
inline

Constructor.

Parameters
[in]partstotal partitions

◆ ~Altered_partitions()

Altered_partitions::~Altered_partitions ( )

Destructor.

Member Function Documentation

◆ finish_write()

void Altered_partitions::finish_write ( row_prebuilt_t prebuilt,
uint  new_part_id 
)
inline

After a write, update cached values for a partition from prebuilt.

Parameters
[in,out]prebuiltPrebuilt to copy from.
[in]new_part_idPartition id to copy.

◆ initialize()

bool Altered_partitions::initialize ( )

Initialize the object.

Returns
false on success
Return values
trueon failure
Returns
false on success else true.

◆ part()

dict_table_t * Altered_partitions::part ( uint  part_id)
inline

Get lower level internal table object for partition.

Parameters
[in]part_idPartition id.
Returns
Lower level internal table object for the partition id.

◆ prepare_write()

void Altered_partitions::prepare_write ( row_prebuilt_t prebuilt,
uint  new_part_id 
) const
inline

To write a row, set up prebuilt for using a specified partition.

Parameters
[in,out]prebuiltPrebuilt to update.
[in]new_part_idPartition to use.

◆ set_part()

void Altered_partitions::set_part ( ulint  new_part_id,
dict_table_t part 
)
inline

Open and set currently used partition.

Parameters
[in]new_part_idPartition id to set.
[in,out]partInternal table object to use.

Member Data Documentation

◆ m_bitset

byte* Altered_partitions::m_bitset
private

bytes for sql_stat_start bitset

◆ m_ins_nodes

ins_node_t** Altered_partitions::m_ins_nodes
private

Insert nodes per partition.

◆ m_new_table_parts

dict_table_t** Altered_partitions::m_new_table_parts
private

New partitions created during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTITION.

◆ m_num_new_parts

size_t Altered_partitions::m_num_new_parts
private

Number of new partitions.

◆ m_sql_stat_start

Sql_stat_start_parts Altered_partitions::m_sql_stat_start
private

sql_stat_start per partition

◆ m_trx_ids

trx_id_t* Altered_partitions::m_trx_ids
private

Trx id per partition.


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