summaryrefslogtreecommitdiff
path: root/storage/xtradb/page
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-07-06 14:18:53 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-07-06 14:18:53 +0300
commit2b5c9bc2c813ea7963959e515da5d60392c35431 (patch)
tree2402b3d6ed96e9307a0d1769be428b24bab7a29a /storage/xtradb/page
parentec76945daca3ef099ba7f5289b986a8360ede7c5 (diff)
downloadmariadb-git-2b5c9bc2c813ea7963959e515da5d60392c35431.tar.gz
MDEV-13247 innodb_log_compressed_pages=OFF breaks crash recovery of ROW_FORMAT=COMPRESSED tables
The option innodb_log_compressed_pages was contributed by Facebook to MySQL 5.6. It was disabled in the 5.6.10 GA release due to problems that were fixed in 5.6.11, which is when the option was enabled. The option was set to innodb_log_compressed_pages=ON by default (disabling the feature), because safety was considered more important than speed. The option innodb_log_compressed_pages=OFF can *CORRUPT* ROW_FORMAT=COMPRESSED tables on crash recovery if the zlib deflate function is behaving differently (producing a different amount of compressed data) from how it behaved when the redo log records were written (prior to the crash recovery). In MDEV-6935, the default value was changed to innodb_log_compressed_pages=OFF. This is inherently unsafe, because there are very many different environments where MariaDB can be running, using different zlib versions. While zlib can decompress data just fine, there are no guarantees that different versions will always compress the same data to the exactly same size. To avoid problems related to zlib upgrades or version mismatch, we must use a safe default setting. This will reduce the write performance for users of ROW_FORMAT=COMPRESSED tables. If you configure innodb_log_compressed_pages=ON, please make sure that you will always cleanly shut down InnoDB before upgrading the server or zlib.
Diffstat (limited to 'storage/xtradb/page')
-rw-r--r--storage/xtradb/page/page0zip.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/storage/xtradb/page/page0zip.cc b/storage/xtradb/page/page0zip.cc
index 32e76fb44e6..bf7b4928e61 100644
--- a/storage/xtradb/page/page0zip.cc
+++ b/storage/xtradb/page/page0zip.cc
@@ -2,7 +2,7 @@
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2014, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -83,12 +83,12 @@ UNIV_INTERN mysql_pfs_key_t page_zip_stat_per_index_mutex_key;
#endif /* !UNIV_INNOCHECKSUM */
#endif /* !UNIV_HOTBACKUP */
-/* Compression level to be used by zlib. Settable by user. */
-UNIV_INTERN uint page_zip_level = DEFAULT_COMPRESSION_LEVEL;
+/** Compression level to be used by zlib. Settable by user. */
+UNIV_INTERN uint page_zip_level;
-/* Whether or not to log compressed page images to avoid possible
+/** Whether or not to log compressed page images to avoid possible
compression algorithm changes in zlib. */
-UNIV_INTERN my_bool page_zip_log_pages = false;
+UNIV_INTERN my_bool page_zip_log_pages;
/* Please refer to ../include/page0zip.ic for a description of the
compressed page format. */