mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Clean up trx_undo_page_get_end()
This commit is contained in:
parent
6058f92f5c
commit
bb441ca4ad
1 changed files with 5 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/******************************************************************//**
|
||||
|
|
Loading…
Reference in a new issue