MySQL 9.1.0
Source Code Documentation
|
Classes | |
struct | Checkpoint_header |
Meta data stored in one of two checkpoint headers. More... | |
Functions | |
os_offset_t | compute_real_offset_for_lsn (size_t n_files, os_offset_t file_size, lsn_t some_file_lsn, os_offset_t some_file_offset, lsn_t requested_lsn) |
Provides a file offset for the given lsn. More... | |
bool | checkpoint_header_deserialize (const byte *buf, Checkpoint_header &header) |
Deserializes the log checkpoint header stored in the given buffer. More... | |
std::string | file_name (Log_file_id file_id) |
Provides name of the log file with the given file id, e.g. More... | |
bool | files_validate_format (const Log_files_context &files_ctx, const ut::vector< Log_file_id_and_header > &files, Log_format &format) |
Validates that ib_logfile0 exists and has format older than VERSION_8_0_30. More... | |
static os_offset_t | compute_size_offset (os_offset_t file_size, os_offset_t real_offset) |
static os_offset_t | compute_real_offset (os_offset_t file_size, os_offset_t size_offset) |
Variables | |
constexpr const char *const | FILE_BASE_NAME = "ib_logfile" |
Prefix of log file name in the old redo format (before 8.0.30). More... | |
constexpr Log_file_id | FILE_MAX_ID = 99 |
Maximum redo log file id in the old format (before 8.0.30). More... | |
constexpr os_offset_t | FIELD_CHECKPOINT_NO = 0 |
Checkpoint number. More... | |
constexpr os_offset_t | FIELD_CHECKPOINT_LSN = 8 |
Checkpoint lsn. More... | |
constexpr os_offset_t | FIELD_CHECKPOINT_OFFSET = 16 |
Offset within the log files, which corresponds to checkpoint lsn. More... | |
constexpr uint32_t | FIELD_CHECKPOINT_LOG_BUF_SIZE = 24 |
Size of the log buffer, when the checkpoint write was started. More... | |
bool log_pre_8_0_30::checkpoint_header_deserialize | ( | const byte * | buf, |
Checkpoint_header & | header | ||
) |
Deserializes the log checkpoint header stored in the given buffer.
[in] | buf | the buffer to deserialize |
[out] | header | the deserialized header |
|
static |
os_offset_t log_pre_8_0_30::compute_real_offset_for_lsn | ( | size_t | n_files, |
os_offset_t | file_size, | ||
lsn_t | some_file_lsn, | ||
os_offset_t | some_file_offset, | ||
lsn_t | requested_lsn | ||
) |
Provides a file offset for the given lsn.
For this function to work, some existing file lsn and corresponding offset to that file lsn have to be provided.
[in] | n_files | number of log files |
[in] | file_size | size of each log file (in bytes) |
[in] | some_file_lsn | some file_lsn for which offset is known |
[in] | some_file_offset | file offset corresponding to the given some_file_lsn |
[in] | requested_lsn | the given lsn for which offset is computed |
|
static |
std::string log_pre_8_0_30::file_name | ( | Log_file_id | file_id | ) |
Provides name of the log file with the given file id, e.g.
'ib_logfile0'.
[in] | file_id | id of the log file |
bool log_pre_8_0_30::files_validate_format | ( | const Log_files_context & | files_ctx, |
const ut::vector< Log_file_id_and_header > & | files, | ||
Log_format & | format | ||
) |
Validates that ib_logfile0 exists and has format older than VERSION_8_0_30.
[in] | files_ctx | defines context within which redo log files exist |
[in] | files | non-empty list of file headers of existing log files, ordered by file_id |
[out] | format | discovered redo format if true was returned |
|
constexpr |
Size of the log buffer, when the checkpoint write was started.
It seems it was write-only field in InnoDB. Not used by recovery.
|
constexpr |
Checkpoint lsn.
Recovery starts from this lsn and searches for the first log record group that starts since then. In InnoDB < 8.0.5, it was the exact value at which the first log record group started. Since 8.0.5, the order in flush lists became relaxed and because of that checkpoint lsn values were not precise anymore.
|
constexpr |
Checkpoint number.
It was incremented by one for each next checkpoint. During recovery, all headers were scanned, and one with the maximum checkpoint number was used for the recovery (checkpoint_lsn from that header was used).
|
constexpr |
Offset within the log files, which corresponds to checkpoint lsn.
Used for calibration of lsn and offset calculations.
|
constexpr |
Prefix of log file name in the old redo format (before 8.0.30).
For more details
|
constexpr |
Maximum redo log file id in the old format (before 8.0.30).