mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 11:31:51 +01:00
branches/zip: buf_ptr_get_fsp_addr(): Change parameter ptr to const void*,
and remove the buf_block_align() call.
This commit is contained in:
parent
6b04e80353
commit
b7867623ae
2 changed files with 6 additions and 7 deletions
|
@ -427,7 +427,7 @@ UNIV_INLINE
|
||||||
void
|
void
|
||||||
buf_ptr_get_fsp_addr(
|
buf_ptr_get_fsp_addr(
|
||||||
/*=================*/
|
/*=================*/
|
||||||
byte* ptr, /* in: pointer to a buffer frame */
|
const void* ptr, /* in: pointer to a buffer frame */
|
||||||
ulint* space, /* out: space id */
|
ulint* space, /* out: space id */
|
||||||
fil_addr_t* addr); /* out: page offset and byte offset */
|
fil_addr_t* addr); /* out: page offset and byte offset */
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|
|
@ -281,16 +281,15 @@ UNIV_INLINE
|
||||||
void
|
void
|
||||||
buf_ptr_get_fsp_addr(
|
buf_ptr_get_fsp_addr(
|
||||||
/*=================*/
|
/*=================*/
|
||||||
byte* ptr, /* in: pointer to a buffer frame */
|
const void* ptr, /* in: pointer to a buffer frame */
|
||||||
ulint* space, /* out: space id */
|
ulint* space, /* out: space id */
|
||||||
fil_addr_t* addr) /* out: page offset and byte offset */
|
fil_addr_t* addr) /* out: page offset and byte offset */
|
||||||
{
|
{
|
||||||
buf_block_t* block;
|
const page_t* page = ut_align_down((void*) ptr, UNIV_PAGE_SIZE);
|
||||||
|
ut_ad(buf_block_align(ptr));
|
||||||
|
|
||||||
block = buf_block_align(ptr);
|
*space = mach_read_from_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
|
||||||
|
addr->page = mach_read_from_4(page + FIL_PAGE_OFFSET);
|
||||||
*space = buf_block_get_space(block);
|
|
||||||
addr->page = buf_block_get_page_no(block);
|
|
||||||
addr->boffset = ut_align_offset(ptr, UNIV_PAGE_SIZE);
|
addr->boffset = ut_align_offset(ptr, UNIV_PAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue