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

MDEV-32150 InnoDB reports corruption on 32-bit platforms with ibd files sizes > 4GB

buf_read_page_low(): Use 64-bit arithmetics when computing the
file byte offset. In other calls to fil_space_t::io() the offset
was being computed correctly, for example by
buf_page_t::physical_offset().
parent a3cbc44b
...@@ -335,7 +335,8 @@ buf_read_page_low( ...@@ -335,7 +335,8 @@ buf_read_page_low(
auto fio = space->io(IORequest(sync auto fio = space->io(IORequest(sync
? IORequest::READ_SYNC ? IORequest::READ_SYNC
: IORequest::READ_ASYNC), : IORequest::READ_ASYNC),
page_id.page_no() * len, len, dst, bpage); os_offset_t{page_id.page_no()} * len, len,
dst, bpage);
*err= fio.err; *err= fio.err;
if (UNIV_UNLIKELY(fio.err != DB_SUCCESS)) { if (UNIV_UNLIKELY(fio.err != DB_SUCCESS)) {
......
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