MySQL 8.4.2
Source Code Documentation
AutoIncPersister Class Reference

Persister used for autoinc counters. More...

#include <dict0mem.h>

Inheritance diagram for AutoIncPersister:
[legend]

Public Member Functions

ulint write (const PersistentTableMetadata &metadata, byte *buffer, ulint size) const override
 Write the autoinc counter 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 autoinc counter 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...
 

Detailed Description

Persister used for autoinc counters.

Member Function Documentation

◆ aggregate()

void AutoIncPersister::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 AutoIncPersister::get_write_size ( const PersistentTableMetadata metadata) const
inlineoverridevirtual

Pre-calculate the size of metadata to be written.

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

Implements Persister.

◆ read()

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

Read the autoinc counter from buffer, and store them to metadata object.

Read the autoinc counter from buffer, and store them to a 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 incomplete

Implements Persister.

◆ write()

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

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

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

Implements Persister.


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