diff options
author | Vasil Dimov <vasil.dimov@oracle.com> | 2010-05-21 20:56:47 +0300 |
---|---|---|
committer | Vasil Dimov <vasil.dimov@oracle.com> | 2010-05-21 20:56:47 +0300 |
commit | b22407dadcf264ff46da78d372605c2c3408cc0f (patch) | |
tree | e6b975258e7f1dcadb7b5072285e0f5fab739493 /storage/innobase/row | |
parent | 198a0ae9ae4bf3c7fc059242e7e2b67af6c9d18b (diff) | |
download | mariadb-git-b22407dadcf264ff46da78d372605c2c3408cc0f.tar.gz |
Move os_file_write() before posix_fadvise(POSIX_FADV_DONTNEED).
It is wrong to tell the OS that a block is not going to be accessed and
write to it immediately afterwards.
Diffstat (limited to 'storage/innobase/row')
-rw-r--r-- | storage/innobase/row/row0merge.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/innobase/row/row0merge.c b/storage/innobase/row/row0merge.c index 8c23a5d8f91..0e03ea3e178 100644 --- a/storage/innobase/row/row0merge.c +++ b/storage/innobase/row/row0merge.c @@ -740,6 +740,12 @@ row_merge_write( { ib_uint64_t ofs = ((ib_uint64_t) offset) * sizeof(row_merge_block_t); + ibool ret; + + ret = os_file_write("(merge)", OS_FILE_FROM_FD(fd), buf, + (ulint) (ofs & 0xFFFFFFFF), + (ulint) (ofs >> 32), + sizeof(row_merge_block_t)); #ifdef UNIV_DEBUG if (row_merge_print_block_write) { @@ -754,10 +760,7 @@ row_merge_write( posix_fadvise(fd, ofs, sizeof *buf, POSIX_FADV_DONTNEED); #endif /* POSIX_FADV_DONTNEED */ - return(UNIV_LIKELY(os_file_write("(merge)", OS_FILE_FROM_FD(fd), buf, - (ulint) (ofs & 0xFFFFFFFF), - (ulint) (ofs >> 32), - sizeof(row_merge_block_t)))); + return(UNIV_LIKELY(ret)); } /********************************************************************//** |