Commit e06b159f authored by Daniel Black's avatar Daniel Black

MDEV-33397: Innodb include OS error information when failing to write to iblogfileX

Without an OS error it could one of the many errors from write.
parent 8e731499
...@@ -518,7 +518,9 @@ void log_t::file::write(os_offset_t offset, span<byte> buf) ...@@ -518,7 +518,9 @@ void log_t::file::write(os_offset_t offset, span<byte> buf)
{ {
srv_stats.os_log_pending_writes.inc(); srv_stats.os_log_pending_writes.inc();
if (const dberr_t err= fd.write(offset, buf)) if (const dberr_t err= fd.write(offset, buf))
ib::fatal() << "write(" << fd.get_path() << ") returned " << err; ib::fatal() << "write(" << fd.get_path() << ") returned " << err
<< ". Operating system error number "
<< IF_WIN(GetLastError(), errno) << ".";
srv_stats.os_log_pending_writes.dec(); srv_stats.os_log_pending_writes.dec();
srv_stats.os_log_written.add(buf.size()); srv_stats.os_log_written.add(buf.size());
srv_stats.log_writes.inc(); srv_stats.log_writes.inc();
......
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