MySQL 8.0.40
Source Code Documentation
|
#include <cstring>
#include "log0chkp.h"
#include "log0encryption.h"
#include "log0files_governor.h"
#include "log0files_io.h"
#include "log0sys.h"
#include "log0types.h"
#include "log0write.h"
#include "os0enc.h"
#include "srv0srv.h"
#include "ut0mutex.h"
Functions | |
Log - encryption. | |
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) |
Reads the log encryption header to get the redo log encryption information. More... | |
dberr_t | log_encryption_read (log_t &log, const Log_file &file) |
Reads the log encryption header to get the redo log encryption information. More... | |
bool | log_file_header_fill_encryption (const Encryption_metadata &encryption_metadata, bool encrypt_key, byte *buf) |
Writes encryption information to log header. More... | |
static dberr_t | log_encryption_write_low (log_t &log) |
Writes the encryption information into the log encryption header in the log file containing current checkpoint LSN (log.last_checkpoint_lsn). More... | |
bool | log_can_encrypt (const log_t &log) |
dberr_t | log_encryption_on_master_key_changed (log_t &log) |
Re-encrypts the redo log's encryption metadata using the current master key and writes it encrypted to the log encryption header in the log file containing the current checkpoint lsn (log.last_checkpoint_lsn)). More... | |
dberr_t | log_encryption_generate_metadata (log_t &log) |
Enables the redo log encryption and generates new encryption metadata. More... | |
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 |
Enables the redo log encryption and generates new encryption metadata.
Writes the generated metadata to the log encryption header in the log file containing the current checkpoint lsn (log.last_checkpoint_lsn).
[in,out] | log | redo log |
Re-encrypts the redo log's encryption metadata using the current master key and writes it encrypted to the log encryption header in the log file containing the current checkpoint lsn (log.last_checkpoint_lsn)).
Reads the log encryption header to get the redo log encryption information.
Read is done using the file which contains the current checkpoint_lsn. Updates: log.m_encryption_metadata and log.m_encryption_buf.
[in,out] | log | redo log |
Reads the log encryption header to get the redo log encryption information.
Read is done using the provided file. Updates: log.m_encryption_metadata and log.m_encryption_buf.
[in,out] | log | redo log |
[in] | file | redo file to read from |
Writes the encryption information into the log encryption header in the log file containing current checkpoint LSN (log.last_checkpoint_lsn).
Updates: log.m_encryption_buf.
[in,out] | log | redo log |
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 |