MySQL 9.1.0
Source Code Documentation
CorruptedIndexPersister Class Reference

Persister used for corrupted indexes. More...

#include <dict0mem.h>

Inheritance diagram for CorruptedIndexPersister:
[legend]

Public Member Functions

ulint write (const PersistentTableMetadata &metadata, byte *buffer, ulint size) const override
 Write the corrupted indexes of a table, we can pre-calculate the size by calling get_write_size() More...
 
ulint get_write_size (const PersistentTableMetadata &metadata) const override
 Pre-calculate the size of metadata to be written. More...
 
ulint read (PersistentTableMetadata &metadata, const byte *buffer, ulint size, bool *corrupt) const override
 Read the corrupted indexes from buffer, and store them to metadata object. More...
 
void aggregate (PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const override
 Aggregate metadata entries into a single metadata instance, considering version numbers. More...
 
- Public Member Functions inherited from Persister
virtual ~Persister ()=default
 Virtual destructor. More...
 
void write_log (table_id_t id, const PersistentTableMetadata &metadata, mtr_t *mtr) const
 Write MLOG_TABLE_DYNAMIC_META for persistent dynamic metadata of table. More...
 

Static Private Attributes

static const size_t INDEX_ID_LENGTH = 12
 The length of index_id_t we will write. More...
 

Detailed Description

Persister used for corrupted indexes.

Member Function Documentation

◆ aggregate()

void CorruptedIndexPersister::aggregate ( PersistentTableMetadata metadata,
const PersistentTableMetadata new_entry 
) const
overridevirtual

Aggregate metadata entries into a single metadata instance, considering version numbers.

Parameters
[in,out]metadatametadata object to be modified
[in]new_entrymetadata entry from logs

Implements Persister.

◆ get_write_size()

ulint CorruptedIndexPersister::get_write_size ( const PersistentTableMetadata metadata) const
overridevirtual

Pre-calculate the size of metadata to be written.

Parameters
[in]metadatametadata to be written
Returns
the size of metadata

Implements Persister.

◆ read()

ulint CorruptedIndexPersister::read ( PersistentTableMetadata metadata,
const byte buffer,
ulint  size,
bool *  corrupt 
) const
overridevirtual

Read the corrupted indexes from buffer, and store them to metadata object.

Parameters
[out]metadatametadata where we store the read data
[in]bufferbuffer to read
[in]sizesize of buffer
[out]corrupttrue if we found something wrong in the buffer except incomplete buffer, otherwise false
Returns
the bytes we read from the buffer if the buffer data is complete and we get everything, 0 if the buffer is incompleted

Implements Persister.

◆ write()

ulint CorruptedIndexPersister::write ( const PersistentTableMetadata metadata,
byte buffer,
ulint  size 
) const
overridevirtual

Write the corrupted indexes of a table, we can pre-calculate the size by calling get_write_size()

Parameters
[in]metadatapersistent data
[out]bufferwrite buffer
[in]sizesize of write buffer, should be at least get_write_size()
Returns
the length of bytes written

Implements Persister.

Member Data Documentation

◆ INDEX_ID_LENGTH

const size_t CorruptedIndexPersister::INDEX_ID_LENGTH = 12
staticprivate

The length of index_id_t we will write.


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