![]() |
MySQL 26.7.0
Source Code Documentation
|
#include "log0encryption.h"#include <cstring>#include "dict0dict.h"#include "fil0pages_persistence_interface.h"#include "log0chkp.h"#include "log0files_governor.h"#include "log0files_io.h"#include "log0handler_interface.h"#include "log0sys.h"#include "log0types.h"#include "log0write.h"#include "os0enc.h"#include "srv0srv.h"#include "ut0mutex.h"Log - encryption. | |
| using | Metadata_key = ib::redo::Metadata_key |
| using | Metadata_value = ib::redo::Handler_interface::Metadata_value |
| using | Status = ib::redo::Status |
| static Log_files_dict::Const_iterator | log_encryption_file (const log_t &log) |
| Finds redo log file which has the current log encryption header. More... | |
| dberr_t | log_encryption_read (log_t &log, Metadata_value &block) |
| Reads the log encryption header to get the redo log encryption information. More... | |
| dberr_t | log_read_encryption_info (log_t &log) |
| Read the log encryption information from Redo Log Handler and update log.m_encryption_metadata and log.m_encryption_buf. More... | |
| bool | log_file_header_fill_encryption (const Encryption_metadata &encryption_metadata, bool encrypt_key, byte *buf) |
| Writes encryption information to log header. More... | |
| bool | log_can_encrypt (const log_t &log) |
| dberr_t | log_encryption_update_and_write_header (log_t &log, const Metadata_value block) |
| Update in-mem encryption information with the new information and also write this new information to encryption header. More... | |
| dberr_t | log_encryption_generate_metadata () |
| Generate new encryption information for REDO log. More... | |
| using Metadata_key = ib::redo::Metadata_key |
| using Status = ib::redo::Status |
| bool log_can_encrypt | ( | const log_t & | log | ) |
|
static |
Finds redo log file which has the current log encryption header.
Asserts that the file has been found.
| [in] | log | redo log |
| dberr_t log_encryption_generate_metadata | ( | ) |
Generate new encryption information for REDO log.
| dberr_t log_encryption_read | ( | log_t & | log, |
| ib::redo::Handler_interface::Metadata_value & | block | ||
| ) |
Reads the log encryption header to get the redo log encryption information.
Read is done using the file which contains the current checkpoint_lsn.
| [in] | log | redo log |
| [out] | block | block to read encryption information into |
| dberr_t log_encryption_update_and_write_header | ( | log_t & | log, |
| const ib::redo::Handler_interface::Metadata_value | block | ||
| ) |
Update in-mem encryption information with the new information and also write this new information to encryption header.
| [in,out] | log | redo log |
| [in] | block | block containing new encryption information |
| bool log_file_header_fill_encryption | ( | const Encryption_metadata & | encryption_metadata, |
| bool | encrypt_key, | ||
| byte * | buf | ||
| ) |
Writes encryption information to log header.
| [in] | encryption_metadata | encryption metadata (algorithm, key, iv) |
| [in] | encrypt_key | encrypt with master key |
| [in,out] | buf | log file encryption header |