|
| Parse_result< Record_view > | parse_record (std::span< const uint8_t > buffer) |
| | Parse redo record. More...
|
| |
| Parse_result< size_t > | parse_page_record_body (int type, uint32_t space_id, uint32_t page_no, std::span< const uint8_t > buffer) |
| | Parse page data record body. More...
|
| |
| Parse_result< size_t > | parse_table_record_body (uint64_t table_id, std::span< const uint8_t > buffer) |
| | Parse table metadata record body. More...
|
| |
| Parse_result< size_t > | parse_or_apply_page_record_body (int rec_type, uint32_t space_id, uint32_t page_no, std::span< const uint8_t > buffer, buf_block_t *block, mtr_t *mtr) |
| | Parse or apply page data record body. More...
|
| |
| bool | check_encryption (uint32_t page_no, uint32_t space_id, const byte *start, const byte *end) |
| | Check if redo record has encryption information. More...
|
| |
| const byte * | parse_index (const byte *ptr, const byte *end_ptr, dict_index_t **index, const page_t *page) |
| | Calls mlog_parse_index() and sets index->id if page is not null. More...
|
| |
◆ Impl()
| ib::redo::Redo_applier::Impl::Impl |
( |
| ) |
|
|
inline |
◆ apply()
We don't want to ever apply MLOG_FILE_CREATE to a page, even to page 0, even though for legacy reasons the MLOG_FILE_CREATE starts with a header which looks as if it was a record targeting page_no=0 of a given space.
This assert is to distinguish if a given parser's subfunction returned nullptr because it had trouble with parsing, or because the buffer was nullptr to begin with
◆ check_encryption()
| bool ib::redo::Redo_applier::Impl::check_encryption |
( |
uint32_t |
page_no, |
|
|
uint32_t |
space_id, |
|
|
const byte * |
start, |
|
|
const byte * |
end |
|
) |
| |
|
inlineprivate |
Check if redo record has encryption information.
- Parameters
-
| page_no | page number |
| space_id | tablespace id |
| start | record body start |
| end | record body end |
- Returns
- True if encryption information presents.
◆ is_space_record()
| static bool ib::redo::Redo_applier::Impl::is_space_record |
( |
int |
type | ) |
|
|
inlinestaticprivate |
Check if the record is of table space kind.
- Parameters
-
- Returns
- true if the record is of table space kind, false otherwise.
◆ parse_index()
Calls mlog_parse_index() and sets index->id if page is not null.
mlog_parse_index() creates a dummy index with the index->id field unset. This field is required when applying a record to a page. In this case, read the index id from the page header and assign it.
- Parameters
-
| [in] | ptr | buffer |
| [in] | end_ptr | buffer end |
| [out] | index | own: dummy index |
| [in] | page | page to apply the record or null |
- Returns
- parsed record end or null if record is incomplete.
◆ parse_mtr()
| Parse_result< Mtr_view > ib::redo::Redo_applier::Impl::parse_mtr |
( |
std::span< const uint8_t > |
buffer | ) |
|
|
inline |
◆ parse_or_apply_page_record_body()
| Parse_result< size_t > ib::redo::Redo_applier::Impl::parse_or_apply_page_record_body |
( |
int |
rec_type, |
|
|
uint32_t |
space_id, |
|
|
uint32_t |
page_no, |
|
|
std::span< const uint8_t > |
buffer, |
|
|
buf_block_t * |
block, |
|
|
mtr_t * |
mtr |
|
) |
| |
|
inlineprivate |
Parse or apply page data record body.
- Parameters
-
| rec_type | record type |
| space_id | tablespace id |
| page_no | page number |
| buffer | buffer to parse or apply |
| block | block containing a page to apply (nullptr for parsing) |
| mtr | mtr for apply operation (nullptr for parsing) |
- Returns
- Record body size or error.
- Note
- This function was moved from log0recv.cc mostly untouched and needs to be refactored:
- Consider to get rid of the block parameter.
- Consider to get rid of the mtr parameter.
- Get rid of recv_sys global usage.
- Get rid of other possible innodb globals.
- Decide how to handle table space flags modification.
- Create unit tests for all possible record types.
A few lines later fil_tablespace_redo_delete(..,true) is called where the last argument means parse_only. Passing hardcoded pasre_only=true is only justified if we assume that true return from is_space_record(type) implies applying_redo variable is false
◆ parse_page_record_body()
| Parse_result< size_t > ib::redo::Redo_applier::Impl::parse_page_record_body |
( |
int |
type, |
|
|
uint32_t |
space_id, |
|
|
uint32_t |
page_no, |
|
|
std::span< const uint8_t > |
buffer |
|
) |
| |
|
inlineprivate |
Parse page data record body.
- Parameters
-
| type | record type |
| space_id | tablespace id |
| page_no | page number |
| buffer | buffer to parse |
- Returns
- Record body size or error.
◆ parse_record()
Parse redo record.
- Parameters
-
- Returns
- Parsed record or error.
◆ parse_table_record_body()
| Parse_result< size_t > ib::redo::Redo_applier::Impl::parse_table_record_body |
( |
uint64_t |
table_id, |
|
|
std::span< const uint8_t > |
buffer |
|
) |
| |
|
inlineprivate |
Parse table metadata record body.
- Parameters
-
| table_id | table id |
| buffer | buffer to parse |
- Returns
- Record body size or error.
◆ m_persisters
| std::unique_ptr<Persisters> ib::redo::Redo_applier::Impl::m_persisters |
|
private |
The documentation for this class was generated from the following file: