mirror of
https://github.com/MariaDB/server.git
synced 2025-02-06 05:42:19 +01:00
7feec30939
it's just a suggestion anyway, not a bullet-proof check, let's not act as if it is
91 lines
4 KiB
Text
91 lines
4 KiB
Text
-- source include/have_innodb.inc
|
|
-- source include/have_file_key_management_plugin.inc
|
|
# embedded does not support restart
|
|
-- source include/not_embedded.inc
|
|
|
|
call mtr.add_suppression("mariadbd.*: File ");
|
|
call mtr.add_suppression("Plugin 'file_key_management' ");
|
|
call mtr.add_suppression("InnoDB: Recovery cannot access file");
|
|
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
|
call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
|
|
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
|
call mtr.add_suppression("Fewer engines are enabled now than were before the crash");
|
|
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
|
|
call mtr.add_suppression("InnoDB: Cannot apply log to \\[page id: space=[1-9][0-9]*, page number=0\\] of corrupted file '.*test.t[1-5]\\.ibd'");
|
|
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
|
|
call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch");
|
|
call mtr.add_suppression("InnoDB: Missing FILE_CHECKPOINT");
|
|
call mtr.add_suppression("InnoDB: Log scan aborted at LSN");
|
|
call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption");
|
|
call mtr.add_suppression("InnoDB: Encryption key is not found for");
|
|
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
|
-- source include/restart_mysqld.inc
|
|
|
|
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
|
|
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
|
|
create table t3(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=20;
|
|
create table t4(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb encrypted=yes;
|
|
|
|
begin;
|
|
--disable_query_log
|
|
--let $i = 20
|
|
begin;
|
|
while ($i)
|
|
{
|
|
insert into t1(c,b) values (repeat('secret1',20), repeat('secret2',6000));
|
|
dec $i;
|
|
}
|
|
--enable_query_log
|
|
|
|
insert into t2 select * from t1;
|
|
insert into t3 select * from t1;
|
|
insert into t4 select * from t1;
|
|
commit;
|
|
|
|
let $no_checkpoint_flush= 1;
|
|
--source ../../suite/innodb/include/no_checkpoint_start.inc
|
|
|
|
#
|
|
# We test redo log page read at recv_read_page using
|
|
# keys that are not in std_data/keys.txt. If checkpoint
|
|
# happens we will skip this test. If no checkpoint
|
|
# happens, InnoDB refuses to start as used
|
|
# encryption key is not found.
|
|
#
|
|
CREATE TABLE t5 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES;
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
begin;
|
|
update t1 set c = repeat('secret3', 20);
|
|
update t2 set c = repeat('secret4', 20);
|
|
update t3 set c = repeat('secret4', 20);
|
|
update t4 set c = repeat('secret4', 20);
|
|
insert into t1 (c,b) values (repeat('secret5',20), repeat('secret6',6000));
|
|
insert into t2 (c,b) values (repeat('secret7',20), repeat('secret8',6000));
|
|
insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
|
|
insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
|
|
INSERT INTO t5 VALUES ('foo'),('bar');
|
|
COMMIT;
|
|
|
|
let $cleanup= drop table t1,t2,t3,t4,t5;
|
|
--let CLEANUP_IF_CHECKPOINT= $cleanup;
|
|
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
|
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys-not-found.txt
|
|
-- source include/start_mysqld.inc
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
|
|
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
|
let SEARCH_PATTERN = \[ERROR\] InnoDB: Encryption key is not found for .*test.t[1-5].ibd;
|
|
--source include/search_pattern_in_file.inc
|
|
|
|
#
|
|
# In above server does start but InnoDB refuses to start
|
|
# thus we need to restart server with correct key file
|
|
#
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
|
-- source include/restart_mysqld.inc
|
|
|
|
drop table t1,t2,t3,t4,t5;
|