MySQL 8.4.2
Source Code Documentation
|
Interface for persistent dynamic table metadata. More...
#include <dict0mem.h>
Public Member Functions | |
virtual | ~Persister ()=default |
Virtual destructor. More... | |
virtual ulint | write (const PersistentTableMetadata &metadata, byte *buffer, ulint size) const =0 |
Write the dynamic metadata of a table, we can pre-calculate the size by calling get_write_size() More... | |
virtual ulint | get_write_size (const PersistentTableMetadata &metadata) const =0 |
Pre-calculate the size of metadata to be written. More... | |
virtual ulint | read (PersistentTableMetadata &metadata, const byte *buffer, ulint size, bool *corrupt) const =0 |
Read the dynamic metadata from buffer, and store them to metadata object. More... | |
virtual void | aggregate (PersistentTableMetadata &metadata, const PersistentTableMetadata &new_entry) const =0 |
Aggregate metadata entries into a single metadata instance, considering version numbers. 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... | |
Interface for persistent dynamic table metadata.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Aggregate metadata entries into a single metadata instance, considering version numbers.
[in,out] | metadata | metadata object to be modified |
[in] | new_entry | metadata entry from logs |
Implemented in CorruptedIndexPersister, and AutoIncPersister.
|
pure virtual |
Pre-calculate the size of metadata to be written.
[in] | metadata | metadata to be written |
Implemented in CorruptedIndexPersister, and AutoIncPersister.
|
pure virtual |
Read the dynamic metadata from buffer, and store them to metadata object.
[out] | metadata | metadata where we store the read data |
[in] | buffer | buffer to read |
[in] | size | size of buffer |
[out] | corrupt | true if we found something wrong in the buffer except incomplete buffer, otherwise false |
Implemented in CorruptedIndexPersister, and AutoIncPersister.
|
pure virtual |
Write the dynamic metadata of a table, we can pre-calculate the size by calling get_write_size()
[in] | metadata | persistent data |
[out] | buffer | write buffer |
[in] | size | size of write buffer, should be at least get_write_size() |
Implemented in CorruptedIndexPersister, and AutoIncPersister.
void Persister::write_log | ( | table_id_t | id, |
const PersistentTableMetadata & | metadata, | ||
mtr_t * | mtr | ||
) | const |
Write MLOG_TABLE_DYNAMIC_META for persistent dynamic metadata of table.
[in] | id | Table id |
[in] | metadata | Metadata used to write the log |
[in,out] | mtr | Mini-transaction |