mirror of
https://github.com/MariaDB/server.git
synced 2025-04-21 14:45:34 +02:00

Now there can be only one log file instead of several which logically work as a single file. Possible names of redo log files: ib_logfile0, ib_logfile101 (for just created one) innodb_log_fiels_in_group: value of this variable is not used by InnoDB. Possible values are still 1..100, to not break upgrade LOG_FILE_NAME: add constant of value "ib_logfile0" LOG_FILE_NAME_PREFIX: add constant of value "ib_logfile" get_log_file_path(): convenience function that returns full path of a redo log file SRV_N_LOG_FILES_MAX: removed srv_n_log_files: we can't remove this for compatibility reasons, but now server doesn't use this variable log_sys_t::file::fd: now just one, not std::vector log_sys_t::log_capacity: removed word 'group' find_and_check_log_file(): part of logic from huge srv_start() moved here recv_sys_t::files: file descriptors of redo log files. There can be several of those in case we're upgrading from older MariaDB version. recv_sys_t::remove_extra_log_files: whether to remove ib_logfile{1,2,3...} after successfull upgrade. recv_sys_t::read(): open if needed and read from one of several log files recv_sys_t::files_size(): open if needed and return files count redo_file_sizes_are_correct(): check that redo log files sizes are equal. Just to log an error for a user. Corresponding check was moved from srv0start.cc namespace deprecated: put all deprecated variables here to prevent usage of it by us, developers
96 lines
3 KiB
Text
96 lines
3 KiB
Text
-- source include/have_innodb.inc
|
|
-- source include/not_embedded.inc
|
|
-- source filekeys_plugin.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-9011: Redo log encryption does not work
|
|
--echo #
|
|
|
|
--echo #
|
|
--echo # MDEV-9422 Encrypted redo log checksum errors
|
|
--echo # on restart after killing busy server instance
|
|
--echo #
|
|
|
|
--let $MYSQLD_DATADIR=`select @@datadir`
|
|
|
|
SET GLOBAL innodb_log_checksums=0;
|
|
SELECT @@global.innodb_log_checksums;
|
|
|
|
CREATE TABLE t0 (
|
|
pk bigint auto_increment,
|
|
col_int int,
|
|
col_int_key int,
|
|
col_char char(12),
|
|
col_char_key char(12),
|
|
primary key (pk),
|
|
key (col_int_key),
|
|
key (col_char_key)
|
|
) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
|
CREATE TEMPORARY TABLE t LIKE t0;
|
|
|
|
INSERT INTO t VALUES
|
|
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
|
|
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
|
|
|
|
# Prevent change buffering of key(col_char_key), so that
|
|
# after the restart, the data ('secret','success','secure','sacrament')
|
|
# cannot be emitted to the unencrypted redo log by change buffer merge.
|
|
SET GLOBAL innodb_change_buffering=none;
|
|
|
|
# Force a redo log flush at the next commit.
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
INSERT INTO t0
|
|
SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key
|
|
FROM t t1, t t2, t t3, t t4, t t5;
|
|
|
|
--source include/kill_mysqld.inc
|
|
|
|
--let SEARCH_RANGE = 10000000
|
|
--let SEARCH_PATTERN=private|secret|sacr(ed|ament)|success|story|secur(e|ity)
|
|
|
|
--echo # ibdata1 expecting NOT FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/ibdata1
|
|
-- source include/search_pattern_in_file.inc
|
|
--echo # t0.ibd expecting NOT FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t0.ibd
|
|
-- source include/search_pattern_in_file.inc
|
|
--echo # ib_logfile0 expecting NOT FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile0
|
|
-- source include/search_pattern_in_file.inc
|
|
|
|
--echo # Restart without redo log encryption
|
|
-- let $restart_parameters=--skip-innodb-encrypt-log
|
|
-- source include/start_mysqld.inc
|
|
|
|
SELECT COUNT(*) FROM t0;
|
|
CHECK TABLE t0;
|
|
# Force a redo log flush at the next commit.
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
# If we tested with UPDATE, we would get clear-text redo log for
|
|
# encrypted undo log written with the old secret values.
|
|
INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip');
|
|
|
|
--source include/kill_mysqld.inc
|
|
|
|
--echo # ib_logfile0 expecting NOT FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile0
|
|
-- source include/search_pattern_in_file.inc
|
|
--let SEARCH_PATTERN=(public|gossip).*
|
|
--echo # ib_logfile0 expecting FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile0
|
|
-- source include/search_pattern_in_file.inc
|
|
|
|
--let SEARCH_PATTERN=private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip
|
|
--echo # ibdata1 expecting NOT FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/ibdata1
|
|
-- source include/search_pattern_in_file.inc
|
|
--echo # t0.ibd expecting NOT FOUND
|
|
-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t0.ibd
|
|
-- source include/search_pattern_in_file.inc
|
|
|
|
--let $restart_parameters=
|
|
--source include/start_mysqld.inc
|
|
|
|
SELECT COUNT(*) FROM t0;
|
|
CHECK TABLE t0;
|
|
DROP TABLE t0;
|