mariadb/extra
Jan Lindström 1af8bf39ca MDEV-12113: install_db shows corruption for rest encryption with innodb_data_file_path=ibdata1:3M;
Problem was that FIL_PAGE_FLUSH_LSN_OR_KEY_VERSION field that for
encrypted pages even in system datafiles should contain key_version
except very first page (0:0) is after encryption overwritten with
flush lsn.

Ported WL#7990 Repurpose FIL_PAGE_FLUSH_LSN to 10.1
The field FIL_PAGE_FLUSH_LSN_OR_KEY_VERSION is consulted during
InnoDB startup.

At startup, InnoDB reads the FIL_PAGE_FLUSH_LSN_OR_KEY_VERSION
from the first page of each file in the InnoDB system tablespace.
If there are multiple files, the minimum and maximum LSN can differ.
These numbers are passed to InnoDB startup.

Having the number in other files than the first file of the InnoDB
system tablespace is not providing much additional value. It is
conflicting with other use of the field, such as on InnoDB R-tree
index pages and encryption key_version.

This worklog will stop writing FIL_PAGE_FLUSH_LSN_OR_KEY_VERSION to
other files than the first file of the InnoDB system tablespace
(page number 0:0) when system tablespace is encrypted. If tablespace
is not encrypted we continue writing FIL_PAGE_FLUSH_LSN_OR_KEY_VERSION
to all first pages of system tablespace to avoid unnecessary
warnings on downgrade.

open_or_create_data_files(): pass only one flushed_lsn parameter

xb_load_tablespaces(): pass only one flushed_lsn parameter.

buf_page_create(): Improve comment about where
FIL_PAGE_FIL_FLUSH_LSN_OR_KEY_VERSION is set.

fil_write_flushed_lsn(): A new function, merged from
fil_write_lsn_and_arch_no_to_file() and
fil_write_flushed_lsn_to_data_files().
Only write to the first page of the system tablespace (page 0:0)
if tablespace is encrypted, or write all first pages of system
tablespace and invoke fil_flush_file_spaces(FIL_TYPE_TABLESPACE)
afterwards.

fil_read_first_page(): read flush_lsn and crypt_data only from
first datafile.

fil_open_single_table_tablespace(): Remove output of LSN, because it
was only valid for the system tablespace and the undo tablespaces, not
user tablespaces.

fil_validate_single_table_tablespace(): Remove output of LSN.

checkpoint_now_set(): Use fil_write_flushed_lsn and output
a error if operation fails.

Remove lsn variable from fsp_open_info.

recv_recovery_from_checkpoint_start(): Remove unnecessary second
flush_lsn parameter.

log_empty_and_mark_files_at_shutdown(): Use fil_writte_flushed_lsn
and output error if it fails.

open_or_create_data_files(): Pass only one flushed_lsn variable.
2017-06-01 14:07:48 +03:00
..
mariabackup MDEV-12113: install_db shows corruption for rest encryption with innodb_data_file_path=ibdata1:3M; 2017-06-01 14:07:48 +03:00
readline Merge 10.0.14 into 10.1 2014-10-15 12:59:13 +02:00
yassl Merge 10.0 into 10.1 2017-03-03 13:27:12 +02:00
charset2html.c spelling fixes 2017-03-07 13:38:06 +04:00
CMakeLists.txt Merge branch '10.0' into 10.1 2017-01-16 03:18:14 +02:00
comp_err.c MDEV-5120 Test suite test maria-no-logging fails 2014-09-30 20:31:14 +03:00
innochecksum.cc MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
my_print_defaults.c Minor cleanups, fix compiler warnings 2014-08-09 13:22:01 +03:00
mysql_waitpid.c MDEV-8012: Wrong exit code when asking for help 2016-06-12 22:47:18 +03:00
mysqld_safe_helper.c mysqld_safe_help - remove warning 2017-04-30 15:06:01 +04:00
perror.c Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
replace.c Silence bogus GCC 7 warnings -Wimplicit-fallthrough 2017-05-17 08:27:04 +03:00
resolve_stack_dump.c cleanup: use MYF() for mysys flags 2013-01-23 16:18:09 +01:00
resolveip.c MDEV-419 ensure that all HAVE_XXX constants can be set by cmake 2012-07-31 19:29:07 +02:00