Commit c86d1daa authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove some redundant reads

parent a98ac436
......@@ -168,9 +168,10 @@ trx_undo_get_prev_rec_from_prev_page(buf_block_t *&block, uint16_t rec,
uint32_t page_no, uint16_t offset,
bool shared, mtr_t *mtr)
{
uint32_t prev_page_no= flst_get_prev_addr(TRX_UNDO_PAGE_HDR +
TRX_UNDO_PAGE_NODE +
block->page.frame).page;
uint32_t prev_page_no= mach_read_from_4(TRX_UNDO_PAGE_HDR +
TRX_UNDO_PAGE_NODE +
FLST_PREV + FIL_ADDR_PAGE +
block->page.frame);
if (prev_page_no == FIL_NULL)
return nullptr;
......@@ -237,12 +238,13 @@ trx_undo_get_next_rec_from_next_page(buf_block_t *&block, uint32_t page_no,
{
if (page_no == block->page.id().page_no() &&
mach_read_from_2(block->page.frame + offset + TRX_UNDO_NEXT_LOG))
return NULL;
return nullptr;
uint32_t next= flst_get_next_addr(TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE +
block->page.frame).page;
uint32_t next= mach_read_from_4(TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE +
FLST_NEXT + FIL_ADDR_PAGE +
block->page.frame);
if (next == FIL_NULL)
return NULL;
return nullptr;
block= buf_page_get(page_id_t(block->page.id().space(), next), 0, mode, mtr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment