MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
MetadataRecover Class Reference

Class to parse persistent dynamic metadata redo log, store and merge them and apply them to in-memory table objects finally. More...

#include <log0recv.h>

Public Member Functions

 MetadataRecover () 1=default
 Default constructor. More...
 
 ~MetadataRecover ()
 Destructor. More...
 
const byteparseMetadataLog (table_id_t id, uint64_t version, const byte *ptr, const byte *end)
 Parse a dynamic metadata redo log of a table and store the metadata locally. More...
 
void store ()
 Store the collected persistent dynamic metadata to mysql.innodb_dynamic_metadata. More...
 
bool empty () const
 If there is any metadata to be applied. More...
 

Private Types

using PersistentTables = std::map< table_id_t, PersistentTableMetadata *, std::less< table_id_t >, ut::allocator< std::pair< const table_id_t, PersistentTableMetadata * > > >
 

Private Member Functions

PersistentTableMetadatagetMetadata (table_id_t id)
 Get the dynamic metadata of a specified table, create a new one if not exist. More...
 

Private Attributes

PersistentTables m_tables
 Map used to store and merge persistent dynamic metadata. More...
 

Detailed Description

Class to parse persistent dynamic metadata redo log, store and merge them and apply them to in-memory table objects finally.

Member Typedef Documentation

◆ PersistentTables

Constructor & Destructor Documentation

◆ MetadataRecover()

MetadataRecover::MetadataRecover ( )
default

Default constructor.

◆ ~MetadataRecover()

MetadataRecover::~MetadataRecover ( )

Destructor.

Member Function Documentation

◆ empty()

bool MetadataRecover::empty ( ) const
inline

If there is any metadata to be applied.

Returns
true if any metadata to be applied, otherwise false

◆ getMetadata()

PersistentTableMetadata * MetadataRecover::getMetadata ( table_id_t  id)
private

Get the dynamic metadata of a specified table, create a new one if not exist.

Parameters
[in]idtable id
Returns
the metadata of the specified table

◆ parseMetadataLog()

const byte * MetadataRecover::parseMetadataLog ( table_id_t  id,
uint64_t  version,
const byte ptr,
const byte end 
)

Parse a dynamic metadata redo log of a table and store the metadata locally.

Parameters
[in]idtable id
[in]versiontable dynamic metadata version
[in]ptrredo log start
[in]endend of redo log
Return values
ptrto next redo log record, nullptr if this log record was truncated

◆ store()

void MetadataRecover::store ( )

Store the collected persistent dynamic metadata to mysql.innodb_dynamic_metadata.

Member Data Documentation

◆ m_tables

PersistentTables MetadataRecover::m_tables
private

Map used to store and merge persistent dynamic metadata.


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