Bug #85016 better description for: OS error: 71
Submitted: 16 Feb 2017 9:28
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:5.7.17 OS:Any
Assigned to: CPU Architecture:Any

[16 Feb 2017 9:28] Shane Bester
In error log,  InnoDB says it's an OS error:

[ERROR] InnoDB: Cannot open datafile for read-only: './db/table.ibd' OS error: 71

but this is nonsensical...

[s@s]$ ./bin/perror 71
OS error code  71:  Protocol error

In innodb source code,  ./include/os0file.h we have the actual meanings:

/** Error codes from os_file_get_last_error @{ */
static const ulint OS_FILE_NOT_FOUND = 71;
static const ulint OS_FILE_DISK_FULL = 72;
static const ulint OS_FILE_ALREADY_EXISTS = 73;
static const ulint OS_FILE_PATH_ERROR = 74;

How to repeat:
no testcase needed.

Suggested fix:
either print out a string "OS_FILE_NOT_FOUND" instead of 71 or let perror print out InnoDB errors too.  Or reword the "OS error" text to be more clear.