Clean up trx_undo_page_get_end()

This commit is contained in:
Marko Mäkelä 2018-01-30 16:31:10 +02:00
parent 6058f92f5c
commit bb441ca4ad

View file

@ -193,21 +193,15 @@ inline
uint16_t
trx_undo_page_get_end(const page_t* undo_page, ulint page_no, ulint offset)
{
uint16_t end;
if (page_no == page_get_page_no(undo_page)) {
end = mach_read_from_2(offset + TRX_UNDO_NEXT_LOG + undo_page);
if (end == 0) {
end = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR
+ TRX_UNDO_PAGE_FREE);
if (uint16_t end = mach_read_from_2(TRX_UNDO_NEXT_LOG
+ offset + undo_page)) {
return end;
}
} else {
end = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR
+ TRX_UNDO_PAGE_FREE);
}
return(end);
return mach_read_from_2(TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_FREE
+ undo_page);
}
/******************************************************************//**