MySQL 9.1.0
Source Code Documentation
Addon_fields Class Reference

This class wraps information about usage of addon fields. More...

#include <sort_param.h>

Public Member Functions

 Addon_fields (Addon_fields_array arr)
 
Sort_addon_fieldbegin ()
 
Sort_addon_fieldend ()
 
size_t num_field_descriptors () const
 
ucharallocate_addon_buf (uint sz)
 SortFileIterator needs an extra buffer when unpacking. More...
 
ucharget_addon_buf ()
 
uint get_addon_buf_length () const
 
void set_using_packed_addons (bool val)
 
void set_first_addon_relative_offset (int offset)
 
int first_addon_offset () const
 
bool using_packed_addons () const
 
size_t skip_bytes () const
 How many bytes to skip to get to the actual data; first NULL flags (for tables and addon fields) and then the actual addons. More...
 

Static Public Member Functions

static uint read_addon_length (uchar *p)
 
static void store_addon_length (uchar *p, uint sz)
 Stores the number of bytes used for packed addon fields. More...
 

Static Public Attributes

static const uint size_of_length_field = 4
 

Private Attributes

Addon_fields_array m_field_descriptors
 
ucharm_addon_buf
 Buffer for unpacking addon fields. More...
 
uint m_addon_buf_length
 Length of the buffer. More...
 
bool m_using_packed_addons
 Are we packing the addon fields? More...
 
int m_first_addon_relative_offset = 0
 Number of bytes from after skip_bytes() to the beginning of the first addon field. More...
 

Detailed Description

This class wraps information about usage of addon fields.

An Addon_fields object is used both during packing of data in the filesort buffer, and later during unpacking in 'Filesort_info::unpack_addon_fields'.

See also
documentation for the Sort_addon_field struct.
documentation for get_addon_fields()

Constructor & Destructor Documentation

◆ Addon_fields()

Addon_fields::Addon_fields ( Addon_fields_array  arr)
inline

Member Function Documentation

◆ allocate_addon_buf()

uchar * Addon_fields::allocate_addon_buf ( uint  sz)
inline

SortFileIterator needs an extra buffer when unpacking.

◆ begin()

Sort_addon_field * Addon_fields::begin ( void  )
inline

◆ end()

Sort_addon_field * Addon_fields::end ( void  )
inline

◆ first_addon_offset()

int Addon_fields::first_addon_offset ( ) const
inline

◆ get_addon_buf()

uchar * Addon_fields::get_addon_buf ( )
inline

◆ get_addon_buf_length()

uint Addon_fields::get_addon_buf_length ( ) const
inline

◆ num_field_descriptors()

size_t Addon_fields::num_field_descriptors ( ) const
inline

◆ read_addon_length()

static uint Addon_fields::read_addon_length ( uchar p)
inlinestatic
Returns
Total number of bytes used for packed addon fields. the size of the length field + size of null bits + sum of field sizes.

◆ set_first_addon_relative_offset()

void Addon_fields::set_first_addon_relative_offset ( int  offset)
inline

◆ set_using_packed_addons()

void Addon_fields::set_using_packed_addons ( bool  val)
inline

◆ skip_bytes()

size_t Addon_fields::skip_bytes ( ) const
inline

How many bytes to skip to get to the actual data; first NULL flags (for tables and addon fields) and then the actual addons.

◆ store_addon_length()

static void Addon_fields::store_addon_length ( uchar p,
uint  sz 
)
inlinestatic

Stores the number of bytes used for packed addon fields.

◆ using_packed_addons()

bool Addon_fields::using_packed_addons ( ) const
inline

Member Data Documentation

◆ m_addon_buf

uchar* Addon_fields::m_addon_buf
private

Buffer for unpacking addon fields.

◆ m_addon_buf_length

uint Addon_fields::m_addon_buf_length
private

Length of the buffer.

◆ m_field_descriptors

Addon_fields_array Addon_fields::m_field_descriptors
private

◆ m_first_addon_relative_offset

int Addon_fields::m_first_addon_relative_offset = 0
private

Number of bytes from after skip_bytes() to the beginning of the first addon field.

◆ m_using_packed_addons

bool Addon_fields::m_using_packed_addons
private

Are we packing the addon fields?

◆ size_of_length_field

const uint Addon_fields::size_of_length_field = 4
static

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