diff options
Diffstat (limited to 'storage/xtradb/os/os0file.cc')
-rw-r--r-- | storage/xtradb/os/os0file.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc index fa183d5724d..aa39e7bab7a 100644 --- a/storage/xtradb/os/os0file.cc +++ b/storage/xtradb/os/os0file.cc @@ -6458,10 +6458,11 @@ os_file_trim( ut_ad((trim_len % bsize) == 0); ut_ad((len % bsize) == 0); ut_ad(bsize != 0); + ut_ad((off % bsize) == 0); #ifdef UNIV_TRIM_DEBUG - fprintf(stderr, "Note: TRIM: write_size %lu trim_len %lu len %lu off %lu\n", - *slot->write_size, trim_len, len, off); + fprintf(stderr, "Note: TRIM: write_size %lu trim_len %lu len %lu off %lu bz %lu\n", + *slot->write_size, trim_len, len, off, bsize); #endif // Nothing to do if trim length is zero or if actual write @@ -6500,8 +6501,8 @@ os_file_trim( ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: [Warning] fallocate call failed with error code %d.\n" - " InnoDB: start: %lx len: %lu payload: %lu\n" - " InnoDB: Disabling fallocate for now.\n", ret, (slot->offset+len), trim_len, len); + " InnoDB: start: %lu len: %lu payload: %lu\n" + " InnoDB: Disabling fallocate for now.\n", errno, off, trim_len, len); os_file_handle_error_no_exit(slot->name, " fallocate(FALLOC_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) ", @@ -6545,8 +6546,8 @@ os_file_trim( ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: [Warning] fallocate call failed with error.\n" - " InnoDB: start: %lx len: %du payload: %lu\n" - " InnoDB: Disabling fallocate for now.\n", (slot->offset+len), trim_len, len); + " InnoDB: start: %lu len: %lu payload: %lu\n" + " InnoDB: Disabling fallocate for now.\n", off, trim_len, len); os_file_handle_error_no_exit(slot->name, " DeviceIOControl(FSCTL_FILE_LEVEL_TRIM) ", |