summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-10-06 16:36:40 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-10-07 08:30:20 +0000
commit420798a81ac9a81d20629535fac3032e025e7733 (patch)
treefd930bc1cad32dd561ab9f9bc25462df6d4c3d5e /storage/xtradb
parent0373e05a59afd14444337dfc9f9d3bc98a815e18 (diff)
downloadmariadb-git-420798a81ac9a81d20629535fac3032e025e7733.tar.gz
Refactor os_file_set_size to extend already existing files.
Change fil_space_extend_must_retry() to use this function.
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/fil/fil0fil.cc2
-rw-r--r--storage/xtradb/os/os0file.cc1
2 files changed, 1 insertions, 2 deletions
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index abaffc48135..38cfc13383c 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -1047,7 +1047,6 @@ fil_space_extend_must_retry(
/* fil_read_first_page() expects UNIV_PAGE_SIZE bytes.
fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes.*/
-
os_offset_t new_size = std::max(
os_offset_t(size - file_start_page_no) * page_size,
os_offset_t(FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE));
@@ -1064,7 +1063,6 @@ fil_space_extend_must_retry(
os_has_said_disk_full = FALSE;
start_page_no = size;
}
-
mutex_enter(&fil_system->mutex);
ut_a(node->being_extended);
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index a3f1e860657..183f65bcbd8 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -2636,6 +2636,7 @@ os_file_set_size(
size, name, err);
}
/* Set errno because posix_fallocate() does not do it.*/
+ errno = err;
return(!err);
}
# endif