summaryrefslogtreecommitdiff
path: root/storage/xtradb/fil/fil0fil.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-16 11:12:24 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-16 11:12:24 +0200
commit32170cafad643403985754f6d7a41e8927f4a6cf (patch)
treedc9ab8e15a4e624032b8ba6f87bdc3e4ca9fadd7 /storage/xtradb/fil/fil0fil.cc
parent74a5638a1d5de35f5f377aaae6a5d5266e4d05a6 (diff)
downloadmariadb-git-32170cafad643403985754f6d7a41e8927f4a6cf.tar.gz
MDEV-12075 innodb_use_fallocate does not work in MariaDB Server 10.1.21
fil_space_extend_must_retry(): When innodb_use_fallocate=ON, initialize pages_added = size - space->size so that posix_fallocate() will actually attempt to extend the file, instead of keeping the same size. This is a regression from MDEV-11556 which refactored the InnoDB data file extension.
Diffstat (limited to 'storage/xtradb/fil/fil0fil.cc')
-rw-r--r--storage/xtradb/fil/fil0fil.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index e56b3c0a160..884314352e8 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -1059,6 +1059,8 @@ fil_space_extend_must_retry(
? OS_FILE_READ : OS_FILE_WRITE;
if (srv_use_posix_fallocate) {
+ pages_added = size - space->size;
+
const os_offset_t start_offset = static_cast<os_offset_t>(
start_page_no) * page_size;
const os_offset_t len = static_cast<os_offset_t>(