summaryrefslogtreecommitdiff
path: root/storage/xtradb/fil/fil0fil.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-08 11:35:35 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-08 11:35:35 +0200
commitcbdc389ec9cd9bac3f8fc8f4aea81669a629260f (patch)
tree669568cd445fbd1317e962e7237a86149acfcec5 /storage/xtradb/fil/fil0fil.cc
parent06a7923f4f531c19e5811954b40c46a77610793a (diff)
downloadmariadb-git-cbdc389ec9cd9bac3f8fc8f4aea81669a629260f.tar.gz
MDEV-12022 InnoDB wrongly ignores the end of an .ibd file
InnoDB can wrongly ignore the end of data files when using innodb_page_size=32k or innodb_page_size=64k. These page sizes use an allocation extent size of 2 or 4 megabytes, not 1 megabyte. This issue does not affect MariaDB Server 10.2, which is using the correct WL#5757 code from MySQL 5.7. That said, it does not make sense to ignore the tail of data files. The next time the data file needs to be extended, it would be extended to a multiple of the extent size, once the size exceeds one extent.
Diffstat (limited to 'storage/xtradb/fil/fil0fil.cc')
-rw-r--r--storage/xtradb/fil/fil0fil.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index aae804432c6..6ebfefd9569 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -697,11 +697,6 @@ fil_node_open_file(
return(false);
}
- if (size_bytes >= (1024*1024)) {
- /* Truncate the size to whole extent size. */
- size_bytes = ut_2pow_round(size_bytes, (1024*1024));
- }
-
if (!fsp_flags_is_compressed(flags)) {
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
} else {