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.
This commit is contained in:
Daniel Black 2024-02-07 15:43:19 +11:00
parent 8e7314992f
commit e06b159f02

View file

@ -518,7 +518,9 @@ void log_t::file::write(os_offset_t offset, span<byte> buf)
{
srv_stats.os_log_pending_writes.inc();
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_written.add(buf.size());
srv_stats.log_writes.inc();