MySQL 9.5.0
Source Code Documentation
ddl::Dup Struct Reference

Structure for reporting duplicate records. More...

#include <ddl0ddl.h>

Public Member Functions

 Dup ()=default
 
 Dup (dict_index_t *index, TABLE *table, const ulint *col_map, size_t n_dup)
 Constructor. More...
 
void report (const dfield_t *entry) noexcept
 Report a duplicate key. More...
 
void report () noexcept
 Report a duplicate key, saved in m_entry member. More...
 
void report (const mrec_t *entry, const ulint *offsets) noexcept
 Report a duplicate key. More...
 
bool empty () const noexcept
 
void save_duplicate (const dfield_t *entry)
 Save the duplicate tuple information. More...
 

Public Attributes

dict_index_tm_index {}
 Index being sorted. More...
 
TABLEm_table {}
 MySQL table object. More...
 
const ulintm_col_map {}
 Mapping of column numbers in table to the rebuilt table (index->table), or NULL if not rebuilding table. More...
 
size_t m_n_dup {}
 Number of duplicates. More...
 

Private Attributes

const dfield_tm_entry {nullptr}
 The duplicate tuple of index m_index. More...
 

Detailed Description

Structure for reporting duplicate records.

Constructor & Destructor Documentation

◆ Dup() [1/2]

ddl::Dup::Dup ( )
default

◆ Dup() [2/2]

ddl::Dup::Dup ( dict_index_t index,
TABLE table,
const ulint col_map,
size_t  n_dup 
)
inline

Constructor.

Parameters
[in]indexthe index being sorted.
[in]tableMySQL table, for reporting duplicate key value, if applicable
[in]col_mapMapping of old column numbers to new ones, or nullptr if old_table == new_table
[in]n_dupnumber of duplicates.

Member Function Documentation

◆ empty()

bool ddl::Dup::empty ( ) const
inlinenoexcept
Returns
true if no duplicates reported yet.

◆ report() [1/3]

void ddl::Dup::report ( )
noexcept

Report a duplicate key, saved in m_entry member.

This function will report the duplicate key to the m_table->record[0]. Care needs to be taken when multiple threads call this function, which could result in corruption of the record in m_table->record[0].

◆ report() [2/3]

void ddl::Dup::report ( const dfield_t entry)
noexcept

Report a duplicate key.

This function will report the duplicate key to the m_table->record[0]. Care needs to be taken when multiple threads call this function, which could result in corruption of the record in m_table->record[0].

Parameters
[in]entrythe duplicate key.

◆ report() [3/3]

void ddl::Dup::report ( const mrec_t entry,
const ulint offsets 
)
noexcept

Report a duplicate key.

This function will report the duplicate key to the m_table->record[0]. Care needs to be taken when multiple threads call this function, which could result in corruption of the record in m_table->record[0].

Parameters
[in]entrythe duplicate key.
[in]offsetsRow offsets

◆ save_duplicate()

void ddl::Dup::save_duplicate ( const dfield_t entry)
inline

Save the duplicate tuple information.

Parameters
[in]entryduplicate tuple of index m_index

Member Data Documentation

◆ m_col_map

const ulint* ddl::Dup::m_col_map {}

Mapping of column numbers in table to the rebuilt table (index->table), or NULL if not rebuilding table.

◆ m_entry

const dfield_t* ddl::Dup::m_entry {nullptr}
private

The duplicate tuple of index m_index.

◆ m_index

dict_index_t* ddl::Dup::m_index {}

Index being sorted.

◆ m_n_dup

size_t ddl::Dup::m_n_dup {}

Number of duplicates.

◆ m_table

TABLE* ddl::Dup::m_table {}

MySQL table object.


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