mariadb/storage/innobase
Marko Mäkelä 97f9d3c080 MDEV-13167 InnoDB key rotation is not skipping unused pages
In key rotation, we must initialize unallocated but previously
initialized pages, so that if encryption is enabled on a table,
all clear-text data for the page will eventually be overwritten.
But we should not rotate keys on pages that were never allocated
after the data file was created.

According to the latching order rules, after acquiring the
tablespace latch, no page latches of previously allocated user pages
may be acquired. So, key rotation should check the page allocation
status after acquiring the page latch, not before. But, the latching
order rules also prohibit accessing pages that were not allocated first,
and then acquiring the tablespace latch. Such behaviour would indeed
result in a deadlock when running the following tests:
encryption.innodb_encryption-page-compression
encryption.innodb-checksum-algorithm

Because the key rotation is accessing potentially unallocated pages, it
cannot reliably check if these pages were allocated. It can only check
the page header. If the page number is zero, we can assume that the
page is unallocated.

fil_crypt_rotate_page(): Detect uninitialized pages by FIL_PAGE_OFFSET.
Page 0 is never encrypted, and on other pages that are initialized,
FIL_PAGE_OFFSET must contain the page number.

fil_crypt_is_page_uninitialized(): Remove. It suffices to check the
page number field in fil_crypt_rotate_page().
2017-08-23 10:12:39 +03:00
..
api Merge 10.0 into 10.1 2017-08-09 17:14:40 +03:00
btr MDEV-13227: Assertion failure len < 16384 in file rem0rec.cc line 1285 2017-07-20 13:18:30 +03:00
buf MDEV-13432: Assertion failure in buf0rea.cc line 577 2017-08-17 07:19:12 +03:00
data 5.6.31 2016-06-21 14:21:03 +02:00
dict Merge branch '10.0' into 10.1 2017-08-08 10:18:43 +02:00
dyn Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
eval move to storage/innobase 2015-05-04 19:17:21 +02:00
fil MDEV-13167 InnoDB key rotation is not skipping unused pages 2017-08-23 10:12:39 +03:00
fsp MDEV-13105 InnoDB fails to load a table with PAGE_COMPRESSION_LEVEL after upgrade from 10.1.20 2017-07-05 14:55:56 +03:00
fts MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing 2017-03-14 16:23:10 +02:00
fut Part 1 of MDEV-8139 Fix scrubbing tests 2017-01-04 18:21:42 +02:00
ha move to storage/innobase 2015-05-04 19:17:21 +02:00
handler Merge branch '10.0' into 10.1 2017-08-08 10:18:43 +02:00
ibuf Merge 10.0 into 10.1 2017-05-19 12:29:37 +03:00
include Merge 10.0 into 10.1 2017-08-09 17:14:40 +03:00
lock Never pass NULL to innobase_get_stmt() 2017-05-17 08:27:04 +03:00
log MDEV-12975 InnoDB redo log minimum size check uses detected file size instead of requested innodb_log_file_size 2017-06-19 16:17:03 +03:00
mach 5.6.35 2017-01-07 14:24:42 +02:00
mem 5.6.31 2016-06-21 14:21:03 +02:00
mtr Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
mysql-test/storage_engine Merge branch '10.0' into 10.1 2017-08-08 10:18:43 +02:00
os Merge 10.0 into 10.1 2017-05-20 08:41:20 +03:00
page MDEV-13443: Port innochecksum tests from 10.2 innodb_zip suite to 10.1 2017-08-07 12:39:38 +03:00
pars MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing 2017-03-14 16:23:10 +02:00
que 5.6.24 2015-05-04 22:13:46 +02:00
read move to storage/innobase 2015-05-04 19:17:21 +02:00
rem Merge 10.0 into 10.1 2017-05-19 12:29:37 +03:00
row Merge 10.0 into 10.1 2017-08-09 17:14:40 +03:00
srv Merge branch '10.0' into 10.1 2017-08-08 10:18:43 +02:00
sync Silence bogus GCC 7 warnings -Wimplicit-fallthrough 2017-05-17 08:27:04 +03:00
trx Merge 10.0 into 10.1 2017-06-12 14:26:32 +03:00
usr Remove redundant UT_LIST_INIT() calls 2017-05-17 10:33:49 +03:00
ut MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
CMakeLists.txt Merge branch '10.0' into 10.1 2017-08-15 09:50:31 +02:00
compile-innodb move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Google move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Percona move to storage/innobase 2015-05-04 19:17:21 +02:00
Doxyfile move to storage/innobase 2015-05-04 19:17:21 +02:00
ha_innodb.def move to storage/innobase 2015-05-04 19:17:21 +02:00
plugin_exports Solaris compilation failure: xtradb is linked in statically, ha_innodb.so needs 2014-05-01 14:05:52 +02:00