diff options
Diffstat (limited to 'storage/xtradb/os/os0file.cc')
-rw-r--r-- | storage/xtradb/os/os0file.cc | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc index cd14e2025be..cb074cdf4f5 100644 --- a/storage/xtradb/os/os0file.cc +++ b/storage/xtradb/os/os0file.cc @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. Copyright (c) 2013, 2015, MariaDB Corporation. @@ -3103,11 +3103,17 @@ try_again: if ((ulint) ret == n) { return(TRUE); + } else if (ret == -1) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Error in system call pread(). The operating" + " system error number is %lu.",(ulint) errno); + } else { + /* Partial read occured */ + ib_logf(IB_LOG_LEVEL_ERROR, + "Tried to read " ULINTPF " bytes at offset " + UINT64PF ". Was only able to read %ld.", + n, offset, (lint) ret); } - - ib_logf(IB_LOG_LEVEL_ERROR, - "Tried to read " ULINTPF " bytes at offset " UINT64PF ". " - "Was only able to read %ld.", n, offset, (lint) ret); #endif /* __WIN__ */ retry = os_file_handle_error(NULL, "read", __FILE__, __LINE__); @@ -3201,6 +3207,16 @@ try_again: if ((ulint) ret == n) { return(TRUE); + } else if (ret == -1) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Error in system call pread(). The operating" + " system error number is %lu.",(ulint) errno); + } else { + /* Partial read occured */ + ib_logf(IB_LOG_LEVEL_ERROR, + "Tried to read " ULINTPF " bytes at offset " + UINT64PF ". Was only able to read %ld.", + n, offset, (lint) ret); } #endif /* __WIN__ */ retry = os_file_handle_error_no_exit(NULL, "read", FALSE, __FILE__, __LINE__); @@ -3382,18 +3398,26 @@ retry: ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: Write to file %s failed" - " at offset " UINT64PF ".\n" - "InnoDB: %lu bytes should have been written," - " only %ld were written.\n" - "InnoDB: Operating system error number %lu.\n" - "InnoDB: Check that your OS and file system" - " support files of this size.\n" - "InnoDB: Check also that the disk is not full" - " or a disk quota exceeded.\n", - name, offset, n, (lint) ret, - (ulint) errno); + if(ret == -1) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Failure of system call pwrite(). Operating" + " system error number is %lu.", + (ulint) errno); + } else { + fprintf(stderr, + " InnoDB: Error: Write to file %s failed" + " at offset " UINT64PF ".\n" + "InnoDB: %lu bytes should have been written," + " only %ld were written.\n" + "InnoDB: Operating system error number %lu.\n" + "InnoDB: Check that your OS and file system" + " support files of this size.\n" + "InnoDB: Check also that the disk is not full" + " or a disk quota exceeded.\n", + name, offset, n, (lint) ret, + (ulint) errno); + } + if (strerror(errno) != NULL) { fprintf(stderr, "InnoDB: Error number %d means '%s'.\n", |