![]() |
MySQL 26.7.0
Source Code Documentation
|
#include "log0handler.h"#include <cstring>#include <sstream>#include "buf0flu.h"#include "db0err.h"#include "log0buf.h"#include "log0chkp.h"#include "log0encryption.h"#include "log0helpers.h"#include "log0log.h"#include "log0pre_8_0_30.h"#include "log0recv.h"#include "log0sys_var_handler.h"#include "log0test.h"#include "log0types.h"#include "log0write.h"#include "srv0srv.h"#include "srv0start.h"#include "ut0new.h"Classes | |
| struct | anonymous_namespace{log0handler.cc}::Log_checkpoint_location |
| Describes location of a single checkpoint. More... | |
Namespaces | |
| namespace | anonymous_namespace{log0handler.cc} |
| namespace | ib |
| namespace | ib::redo |
Functions | |
| static bool | log_block_is_valid (const byte *log_block, Log_data_block_header block_header, lsn_t scanned_lsn, lsn_t total_scanned_lsn) |
| Validates the raw REDO log block buffer. More... | |
| static bool | recv_sys_add_to_parsing_buf (const byte *log_block, lsn_t scanned_lsn, lsn_t &ignore_below_lsn, ib::redo::Buffer &parsing_buffer, size_t &parsed_length) |
| Add raw REDO blocks to parsing buffer. More... | |
| static ib::redo::Lsn | recv_read_log_seg (log_t &log, byte *buf, ib::redo::Lsn start_lsn, ib::redo::Lsn end_lsn) |
| Reads a specified log segment to a buffer. More... | |
| static dberr_t | read_checkpoint (log_t &log, ib::redo::Handler_interface::Metadata_value &block) |
| Read the checkpoint block from the REDO log. More... | |
| static dberr_t | read_header (log_t &log, ib::redo::Handler_interface::Metadata_value &block) |
| Read the REDO header block from the REDO log. More... | |
| static dberr_t | write_header (log_t &log, const ib::redo::Handler_interface::Metadata_value block) |
| Write the REDO header block to the REDO log. More... | |
| static bool | recv_find_max_checkpoint (Log_file_handle &file_handle, Log_checkpoint_location &checkpoint) |
| Find the latest checkpoint in the given log file. More... | |
| static bool | recv_find_max_checkpoint (log_t &log, Log_checkpoint_location &checkpoint) |
| Find the latest checkpoint (check all existing redo log files). More... | |
| static bool | recv_scan_log_recs (const byte *buf, size_t buf_len, ib::redo::Lsn start_lsn, ib::redo::Lsn &total_scanned_lsn, ib::redo::Buffer &parsing_destination) |
| Scans log from a buffer and stores new log data to the destination buffer. More... | |
| static sn_t | ib::redo::log_concurrency_margin (const size_t max_threads, const size_t reserved_bytes_per_thread, lsn_t log_capacity, bool &is_safe) |
| Computes concurrency margin to be used within log_free_check calls, for a given redo log capacity (soft_logical_capacity). More... | |
| Log_checkpoint_header_no | recv_find_checkpoint_header_no (log_t &log, lsn_t checkpoint_lsn) |
| void | log_track_changes_of_recovered_lsn (ib::redo::Lsn old_recovered_lsn, ib::redo::Lsn new_recovered_lsn, ib::redo::Lsn &last_block_first_mtr_boundary) |
| Tracks changes of recovered_lsn and tracks proper values for what first_rec_group should be for consecutive blocks. More... | |
| bool | log_block_checksum_is_ok (const byte *block) |
| Check the 4-byte checksum to the trailer checksum field of a log block. More... | |
| bool log_block_checksum_is_ok | ( | const byte * | block | ) |
Check the 4-byte checksum to the trailer checksum field of a log block.
| [in] | block | pointer to a log block |
|
static |
Validates the raw REDO log block buffer.
| [in] | log_block | REDO log block which contains REDO logs |
| [in] | block_header | REDO log block header |
| [in] | scanned_lsn | Upto which REDO has been scanned |
| [in] | total_scanned_lsn | Till the lsn REDO log is scanned |
| void log_track_changes_of_recovered_lsn | ( | ib::redo::Lsn | old_recovered_lsn, |
| ib::redo::Lsn | new_recovered_lsn, | ||
| ib::redo::Lsn & | last_block_first_mtr_boundary | ||
| ) |
Tracks changes of recovered_lsn and tracks proper values for what first_rec_group should be for consecutive blocks.
Must be called when recv_sys->recovered_lsn is changed to next lsn pointing at boundary between consecutive parsed mini-transactions.
|
static |
Read the checkpoint block from the REDO log.
| [in] | log | Redo log |
| [out] | block | Block containing checkpoint found |
|
static |
Read the REDO header block from the REDO log.
| [in] | log | Redo log |
| [out] | block | Block containing header info |
| Log_checkpoint_header_no recv_find_checkpoint_header_no | ( | log_t & | log, |
| lsn_t | checkpoint_lsn | ||
| ) |
|
static |
Find the latest checkpoint in the given log file.
| [in] | file_handle | handle for the opened redo log file |
| [out] | checkpoint | the latest checkpoint found (if any) |
|
static |
Find the latest checkpoint (check all existing redo log files).
| [in] | log | redo log |
| [out] | checkpoint | the latest checkpoint found (if any) |
|
static |
Reads a specified log segment to a buffer.
| [in,out] | log | redo log |
| [in,out] | buf | buffer where to read |
| [in] | start_lsn | read area start |
| [in] | end_lsn | read area end |
|
static |
Scans log from a buffer and stores new log data to the destination buffer.
| [in] | buf | buffer containing a log segment or garbage |
| [in] | buf_len | buffer length |
| [in] | start_lsn | buffer start lsn |
| [in,out] | total_scanned_lsn | till the lsn REDO log is scanned |
| [out] | parsing_destination | Parsing buffer where RAW REDOs are stored |
|
static |
Add raw REDO blocks to parsing buffer.
| [in] | log_block | REDO log block which contains REDO logs |
| [in] | scanned_lsn | Upto which REDO has been scanned |
| [in,out] | ignore_below_lsn | Don't add anything to parsing buffer below this LSN. If a suitable parse start lsn is found then, set upto which REDO has been added to the parsing buffer so that callers could ignore below that LSN if required. |
| [out] | parsing_buffer | A buffer where REDOs to be added |
| [out] | parsed_length | Length of the REDOs added to parsing buffer |
|
static |
Write the REDO header block to the REDO log.
| [in] | log | Redo log |
| [out] | block | Block containing header info |