MySQL  8.0.21
Source Code Documentation
DDL_Record Class Reference

DDL log record. More...

#include <log0ddl.h>

Public Member Functions

 DDL_Record ()
 Constructor. More...
 
 ~DDL_Record ()
 Destructor. More...
 
ulint get_id () const
 Get the id of the DDL log record. More...
 
void set_id (ulint id)
 Set the id for the DDL log record. More...
 
Log_Type get_type () const
 Get the type of operation to perform for the DDL log record. More...
 
void set_type (Log_Type type)
 Set the type for the DDL log record. More...
 
ulint get_thread_id () const
 Get the thread id for the DDL log record. More...
 
void set_thread_id (ulint thread_id)
 Set the thread id for the DDL log record. More...
 
space_id_t get_space_id () const
 Get the space_id present in the DDL log record. More...
 
void set_space_id (space_id_t space)
 Set the space id for the DDL log record. More...
 
page_no_t get_page_no () const
 Get the page no present in the DDL log record. More...
 
void set_page_no (page_no_t page_no)
 Set the page number for the DDL log record. More...
 
ulint get_index_id () const
 Get the index id present in the DDL log record. More...
 
void set_index_id (ulint index_id)
 Set the index id for the DDL log record. More...
 
table_id_t get_table_id () const
 Get the table id present in the DDL log record. More...
 
void set_table_id (table_id_t table_id)
 Set the table if for the DDL log record. More...
 
void set_deletable (bool deletable)
 Set deletability of this record. More...
 
bool get_deletable () const
 If this record can be deleted. More...
 
const char * get_old_file_path () const
 Get the old file path/name present in the DDL log record. More...
 
void set_old_file_path (const char *name)
 Set the old file path from the name for the DDL log record. More...
 
void set_old_file_path (const byte *data, ulint len)
 Copy the data and set it in old file path. More...
 
const char * get_new_file_path () const
 Get the new file path/name present in the DDL log record. More...
 
void set_new_file_path (const char *name)
 Set the new file path/name for the DDL log record. More...
 
void set_new_file_path (const byte *data, ulint len)
 Copy the data and set it in new file path. More...
 
std::ostream & print (std::ostream &out) const
 Print the DDL record to specified output stream. More...
 

Private Attributes

ulint m_id
 Log id. More...
 
Log_Type m_type
 Log type. More...
 
ulint m_thread_id
 Thread id. More...
 
space_id_t m_space_id
 Tablespace id. More...
 
page_no_t m_page_no
 Index root page. More...
 
ulint m_index_id
 Index id. More...
 
table_id_t m_table_id
 Table id. More...
 
char * m_old_file_path
 Tablespace file path for DELETE, Old tablespace file path for RENAME. More...
 
char * m_new_file_path
 New tablespace file name for RENAME. More...
 
mem_heap_tm_heap
 memory heap object used for storing file name. More...
 
bool m_deletable
 If this record can be deleted. More...
 

Detailed Description

DDL log record.

Constructor & Destructor Documentation

◆ DDL_Record()

DDL_Record::DDL_Record ( )

Constructor.

◆ ~DDL_Record()

DDL_Record::~DDL_Record ( )

Destructor.

Member Function Documentation

◆ get_deletable()

bool DDL_Record::get_deletable ( ) const
inline

If this record can be deleted.

Returns
true if record is deletable.

◆ get_id()

ulint DDL_Record::get_id ( ) const
inline

Get the id of the DDL log record.

Returns
id of the record.

◆ get_index_id()

ulint DDL_Record::get_index_id ( ) const
inline

Get the index id present in the DDL log record.

Returns
index id.

◆ get_new_file_path()

const char* DDL_Record::get_new_file_path ( ) const
inline

Get the new file path/name present in the DDL log record.

Returns
new file path/name.

◆ get_old_file_path()

const char* DDL_Record::get_old_file_path ( ) const
inline

Get the old file path/name present in the DDL log record.

Returns
old file path/name.

◆ get_page_no()

page_no_t DDL_Record::get_page_no ( ) const
inline

Get the page no present in the DDL log record.

Returns
page_no

◆ get_space_id()

space_id_t DDL_Record::get_space_id ( ) const
inline

Get the space_id present in the DDL log record.

Returns
space_id in the DDL log record.

◆ get_table_id()

table_id_t DDL_Record::get_table_id ( ) const
inline

Get the table id present in the DDL log record.

Returns
table id from the record.

◆ get_thread_id()

ulint DDL_Record::get_thread_id ( ) const
inline

Get the thread id for the DDL log record.

Returns
thread id of the DDL log record.

◆ get_type()

Log_Type DDL_Record::get_type ( ) const
inline

Get the type of operation to perform for the DDL log record.

Returns
type of the record.

◆ print()

std::ostream & DDL_Record::print ( std::ostream &  out) const

Print the DDL record to specified output stream.

Parameters
[in,out]outoutput stream
Returns
output stream

◆ set_deletable()

void DDL_Record::set_deletable ( bool  deletable)
inline

Set deletability of this record.

Parameters
[in]deletabledeletability.

◆ set_id()

void DDL_Record::set_id ( ulint  id)
inline

Set the id for the DDL log record.

Parameters
[in]idid of the record.

◆ set_index_id()

void DDL_Record::set_index_id ( ulint  index_id)
inline

Set the index id for the DDL log record.

Parameters
[in]index_idindex id.

◆ set_new_file_path() [1/2]

void DDL_Record::set_new_file_path ( const char *  name)

Set the new file path/name for the DDL log record.

Parameters
[in]namename to be set.

◆ set_new_file_path() [2/2]

void DDL_Record::set_new_file_path ( const byte data,
ulint  len 
)

Copy the data and set it in new file path.

Parameters
[in]datadata to be set
[in]lenlength of the data.

◆ set_old_file_path() [1/2]

void DDL_Record::set_old_file_path ( const char *  name)

Set the old file path from the name for the DDL log record.

Parameters
[in]nameold file name.

◆ set_old_file_path() [2/2]

void DDL_Record::set_old_file_path ( const byte data,
ulint  len 
)

Copy the data and set it in old file path.

Parameters
[in]datadata to be set
[in]lenlength of the data.

◆ set_page_no()

void DDL_Record::set_page_no ( page_no_t  page_no)
inline

Set the page number for the DDL log record.

Parameters
[in]page_nopage number.

◆ set_space_id()

void DDL_Record::set_space_id ( space_id_t  space)
inline

Set the space id for the DDL log record.

Parameters
[in]spacespace id.

◆ set_table_id()

void DDL_Record::set_table_id ( table_id_t  table_id)
inline

Set the table if for the DDL log record.

Parameters
[in]table_idtable id.

◆ set_thread_id()

void DDL_Record::set_thread_id ( ulint  thread_id)
inline

Set the thread id for the DDL log record.

Parameters
[in]thread_idthread id.

◆ set_type()

void DDL_Record::set_type ( Log_Type  type)
inline

Set the type for the DDL log record.

Parameters
[in]typeset the record type.

Member Data Documentation

◆ m_deletable

bool DDL_Record::m_deletable
private

If this record can be deleted.

◆ m_heap

mem_heap_t* DDL_Record::m_heap
private

memory heap object used for storing file name.

◆ m_id

ulint DDL_Record::m_id
private

Log id.

◆ m_index_id

ulint DDL_Record::m_index_id
private

Index id.

◆ m_new_file_path

char* DDL_Record::m_new_file_path
private

New tablespace file name for RENAME.

◆ m_old_file_path

char* DDL_Record::m_old_file_path
private

Tablespace file path for DELETE, Old tablespace file path for RENAME.

◆ m_page_no

page_no_t DDL_Record::m_page_no
private

Index root page.

◆ m_space_id

space_id_t DDL_Record::m_space_id
private

Tablespace id.

◆ m_table_id

table_id_t DDL_Record::m_table_id
private

Table id.

◆ m_thread_id

ulint DDL_Record::m_thread_id
private

Thread id.

◆ m_type

Log_Type DDL_Record::m_type
private

Log type.


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