diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-04-14 23:51:23 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-04-14 23:53:11 +0100 |
commit | 043a9b4e1b9cc173016575cddb6a13acdfcc7ad1 (patch) | |
tree | e489c60c4715430901eff84018fd69b12aef91b9 /storage/innobase/os | |
parent | 4ea636d5e7f3918847d58d7e608c8dd323408c02 (diff) | |
download | mariadb-git-043a9b4e1b9cc173016575cddb6a13acdfcc7ad1.tar.gz |
Windows, innodb : reduce noise from os_file_get_block_size()
if volume can't be opened due to permissions, or
IOCTL_STORAGE_QUERY_PROPERTY fails with not implemented, do not report it.
Those errors happen, there is nothing user can do.
This patch amends fix for MDEV-12948.
Diffstat (limited to 'storage/innobase/os')
-rw-r--r-- | storage/innobase/os/os0file.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 486e8a35c5e..89b02028900 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -865,8 +865,10 @@ os_file_get_block_size( 0, OPEN_EXISTING, 0, 0); if (volume_handle == INVALID_HANDLE_VALUE) { - os_file_handle_error_no_exit(volume, - "CreateFile()", FALSE); + if (GetLastError() != ERROR_ACCESS_DENIED) { + os_file_handle_error_no_exit(volume, + "CreateFile()", FALSE); + } goto end; } @@ -888,16 +890,7 @@ os_file_get_block_size( if (!result) { DWORD err = GetLastError(); - if (err == ERROR_INVALID_FUNCTION || err == ERROR_NOT_SUPPORTED) { - // Don't report error, it is driver's fault, not ours or users. - // We handle this with fallback. Report wit info message, just once. - static bool write_info = true; - if (write_info) { - ib::info() << "DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY)" - << " unsupported on volume " << volume; - write_info = false; - } - } else { + if (err != ERROR_INVALID_FUNCTION || err != ERROR_NOT_SUPPORTED) { os_file_handle_error_no_exit(volume, "DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY)", FALSE); } |