Bug #89073 Space missing in OOS error message
Submitted: 28 Dec 2017 20:35 Modified: 29 Dec 2017 6:04
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.20 OS:Any
Assigned to: CPU Architecture:Any

[28 Dec 2017 20:35] Roel Van de Paar
Description:
2017-12-28T13:00:11.773037Z 9 [ERROR] InnoDB: Write to file ./ibdata1failed at offset 23068672, 1048576 bytes should have been written, only 417792 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.

Note: "Write to file ./ibdata1failed" - it is missing a space before failed

How to repeat:
Run out of space and run into said error message. 

This can also be verified based on code review I assume.
[29 Dec 2017 6:04] Shane Bester
Thanks for the report.  The code in 5.7 :

static MY_ATTRIBUTE((warn_unused_result))
dberr_t
os_file_write_page(
	IORequest&	type,
	const char*	name,
	os_file_t	file,
	const byte*	buf,
	os_offset_t	offset,
	ulint		n)
{
	dberr_t		err;
	ut_ad(type.validate());
	ut_ad(n > 0);

	ssize_t n_bytes = os_file_pwrite(type, file, buf, n, offset, &err);

	if ((ulint) n_bytes != n && !os_has_said_disk_full) {

		ib::error()
			<< "Write to file " << name << "failed at offset "
			<< offset << ", " << n
			<< " bytes should have been written,"
			" only " << n_bytes << " were written."
			" Operating system error number " << errno << "."
			" Check that your OS and file system"
			" support files of this size."
			" Check also that the disk is not full"
			" or a disk quota exceeded.";
[29 Dec 2017 6:05] Shane Bester
While in 8.0 we see the space....

static MY_ATTRIBUTE((warn_unused_result))
dberr_t
os_file_write_page(
	IORequest&	type,
	const char*	name,
	os_file_t	file,
	const byte*	buf,
	os_offset_t	offset,
	ulint		n)
{
	dberr_t		err;

	ut_ad(type.validate());
	ut_ad(n > 0);

	ssize_t n_bytes = os_file_pwrite(type, file, buf, n, offset, &err);

	if ((ulint) n_bytes != n && !os_has_said_disk_full) {

		ib::error()
			<< "Write to file " << name << " failed at offset "
			<< offset << ", " << n
			<< " bytes should have been written,"
			" only " << n_bytes << " were written."
			" Operating system error number " << errno << "."
			" Check that your OS and file system"
			" support files of this size."
			" Check also that the disk is not full"
			" or a disk quota exceeded.";
[29 Dec 2017 6:15] Shane Bester
It was really fixed in 8.0 by:

Commit f9707abc
Sunny Bains <Sunny.Bains@oracle.com>
2017/03/03 03:40:55