Skip to content
Permalink
Browse files
bling windows build fix
  • Loading branch information
kevgs committed Jan 3, 2020
1 parent ccd87d3 commit d978971
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
@@ -615,8 +615,8 @@ void log_t::files::read(size_t total_offset, span<byte> buf)
{
ut_ad(files.size() == file_names.size());

const size_t file_idx= total_offset / file_size;
const size_t offset= total_offset % file_size;
const size_t file_idx= total_offset / static_cast<size_t>(file_size);
const size_t offset= total_offset % static_cast<size_t>(file_size);

if (const dberr_t err= os_file_read(IORequestRead, files[file_idx],
buf.data(), offset, buf.size()))
@@ -630,8 +630,8 @@ void log_t::files::write(size_t total_offset, span<byte> buf)
{
ut_ad(files.size() == file_names.size());

const size_t file_idx= total_offset / file_size;
const size_t offset= total_offset % file_size;
const size_t file_idx= total_offset / static_cast<size_t>(file_size);
const size_t offset= total_offset % static_cast<size_t>(file_size);

if (const dberr_t err=
os_file_write(IORequestWrite, file_names[file_idx].c_str(),
@@ -735,7 +735,7 @@ log_file_header_flush(

srv_stats.os_log_pending_writes.inc();

log_sys.log.write(dest_offset, buf);
log_sys.log.write(static_cast<size_t>(dest_offset), buf);

srv_stats.os_log_pending_writes.dec();
}
@@ -836,7 +836,7 @@ log_write_buf(

ut_a((next_offset >> srv_page_size_shift) <= ULINT_MAX);

log_sys.log.write(next_offset, {buf, write_len});
log_sys.log.write(static_cast<size_t>(next_offset), {buf, write_len});

srv_stats.os_log_pending_writes.dec();

@@ -899,7 +899,7 @@ bool log_t::files::read_log_seg(lsn_t* start_lsn, lsn_t end_lsn)

ut_a((source_offset >> srv_page_size_shift) <= ULINT_MAX);

log_sys.log.read(source_offset, {buf, len});
log_sys.log.read(static_cast<size_t>(source_offset), {buf, len});

for (ulint l = 0; l < len; l += OS_FILE_LOG_BLOCK_SIZE,
buf += OS_FILE_LOG_BLOCK_SIZE,

0 comments on commit d978971

Please sign in to comment.