MySQL 8.0.40
Source Code Documentation
Parser_partition_info Class Reference

#include <partition_info.h>

Inheritance diagram for Parser_partition_info:
[legend]

Public Member Functions

 Parser_partition_info (partition_info *const part_info, partition_element *const current_partition, partition_element *const curr_part_elem, part_elem_value *curr_list_val, uint curr_list_object)
 
void init_col_val (part_column_list_val *col_val, Item *item)
 Initialise part_elem_value object at setting of a new object. More...
 
part_column_list_valadd_column_value ()
 Create a new column value in current list. More...
 
bool add_max_value ()
 Create a new column value in current list with maxvalue. More...
 
bool reorganize_into_single_field_col_val ()
 Reorganize the preallocated buffer into a single field col list. More...
 
bool init_column_part ()
 Initialize a new column for VALUES {LESS THAN|IN}. More...
 
bool add_column_list_value (THD *thd, Item *item)
 Add a column value in VALUES LESS THAN or VALUES IN. More...
 

Public Attributes

partition_info *const part_info
 
partition_element *const current_partition
 
partition_element *const curr_part_elem
 
part_elem_valuecurr_list_val
 
uint curr_list_object
 
uint count_curr_subparts
 

Constructor & Destructor Documentation

◆ Parser_partition_info()

Parser_partition_info::Parser_partition_info ( partition_info *const  part_info,
partition_element *const  current_partition,
partition_element *const  curr_part_elem,
part_elem_value curr_list_val,
uint  curr_list_object 
)
inline

Member Function Documentation

◆ add_column_list_value()

bool Parser_partition_info::add_column_list_value ( THD thd,
Item item 
)

Add a column value in VALUES LESS THAN or VALUES IN.

Parameters
thdThread object
itemItem object representing column value
Returns
Operation status
Return values
trueFailure
falseSuccess
Note
Called from parser.

◆ add_column_value()

part_column_list_val * Parser_partition_info::add_column_value ( )

Create a new column value in current list.

Returns
Pointer to a new part_column_list_val
Return values
!=0 A part_column_list_val object which have been inserted into its list
NULLMemory allocation failure
Note
Called from parser.

◆ add_max_value()

bool Parser_partition_info::add_max_value ( )

Create a new column value in current list with maxvalue.

Returns
Operation status
Return values
trueError
falseSuccess
Note
Called from parser.

◆ init_col_val()

void Parser_partition_info::init_col_val ( part_column_list_val col_val,
Item item 
)

Initialise part_elem_value object at setting of a new object.

Parameters
col_valColumn value object to be initialised
itemItem object representing column value
Note
Helper functions to functions called by parser.

◆ init_column_part()

bool Parser_partition_info::init_column_part ( )

Initialize a new column for VALUES {LESS THAN|IN}.

Initialize part_info object for receiving a set of column values for a partition, called when parser reaches VALUES LESS THAN or VALUES IN.

Returns
Operation status
Return values
trueFailure
falseSuccess

◆ reorganize_into_single_field_col_val()

bool Parser_partition_info::reorganize_into_single_field_col_val ( )

Reorganize the preallocated buffer into a single field col list.

Returns
Operation status
Return values
trueFailure
falseSuccess
Note
In the case of ALTER TABLE ADD/REORGANIZE PARTITION for LIST partitions we can specify list values as: VALUES IN (v1, v2,,,, v17) if we're using the first partitioning variant with a function or a column list partitioned table with one partition field. In this case the parser knows not the number of columns start with and allocates MAX_REF_PARTS in the array. If we try to allocate something beyond MAX_REF_PARTS we will call this function to reorganize into a structure with num_columns = 1. Also when the parser knows that we used LIST partitioning and we used a VALUES IN like above where number of values was smaller than MAX_REF_PARTS or equal, then we will reorganize after discovering this in the parser.

Member Data Documentation

◆ count_curr_subparts

uint Parser_partition_info::count_curr_subparts

◆ curr_list_object

uint Parser_partition_info::curr_list_object

◆ curr_list_val

part_elem_value* Parser_partition_info::curr_list_val

◆ curr_part_elem

partition_element* const Parser_partition_info::curr_part_elem

◆ current_partition

partition_element* const Parser_partition_info::current_partition

◆ part_info

partition_info* const Parser_partition_info::part_info

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