diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-01-25 10:04:14 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-01-25 10:04:14 +0200 |
commit | 4b28798f950ccba16378720393277788792b4b2f (patch) | |
tree | eee5f56dcf6713e4507ec8ffc398160dbc59f9b3 | |
parent | 17430a802b4867c60e7185807c0e2ae14c878475 (diff) | |
download | mariadb-git-4b28798f950ccba16378720393277788792b4b2f.tar.gz |
Fix compiler error on x86.
-rw-r--r-- | storage/innobase/include/os0file.h | 2 | ||||
-rw-r--r-- | storage/innobase/os/os0file.cc | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 0194a876cf3..68369a49c5f 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -434,7 +434,7 @@ public: dberr_t punch_hole( os_file_t fh, os_offset_t offset, - ulint len); + os_offset_t len); private: /** Page to be written on write operation. */ diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 9e41e698cb4..904d0c8273c 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -1887,7 +1887,10 @@ LinuxAIOHandler::collect() && slot->type.is_write() && slot->type.punch_hole()) { - slot->err = slot->type.punch_hole(slot->file, slot->offset, slot->len); + slot->err = slot->type.punch_hole( + slot->file, + slot->offset, + static_cast<os_offset_t>(slot->len)); } else { slot->err = DB_SUCCESS; } @@ -4825,8 +4828,8 @@ os_file_io( && type.is_write() && type.punch_hole()) { *err = type.punch_hole(file, - static_cast<ulint>(offset), - n); + offset, + static_cast<os_offset_t>(n)); } else { *err = DB_SUCCESS; @@ -5494,7 +5497,7 @@ IORequest::punch_hole( return(DB_SUCCESS); ); - ulint trim_len = get_trim_length(len); + os_offset_t trim_len = static_cast<os_offset_t>(get_trim_length(len)); if (trim_len == 0) { return(DB_SUCCESS); @@ -5508,7 +5511,7 @@ IORequest::punch_hole( return DB_IO_NO_PUNCH_HOLE; } - dberr_t err = os_file_punch_hole(fh, off, len); + dberr_t err = os_file_punch_hole(fh, off, trim_len); if (err == DB_SUCCESS) { srv_stats.page_compressed_trim_op.inc(); |