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

If we fail to open a tablespace while looking for FILE_CHECKPOINT, we set the corruption flag. Specifically, if encryption key is missing, we would not be able to open an encrypted tablespace and the flag could be set. We miss checking for this flag and report "Missing FILE_CHECKPOINT" Address review comment to improve the test. Flush pages before starting no-checkpoint block. It should improve the number of cases where the test is skipped because some intermediate checkpoint is triggered.
49 lines
2.8 KiB
Text
49 lines
2.8 KiB
Text
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("InnoDB: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted\\.");
|
|
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
|
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
|
SET GLOBAL innodb_file_per_table = ON;
|
|
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;
|
|
insert into t2 select * from t1;
|
|
insert into t3 select * from t1;
|
|
insert into t4 select * from t1;
|
|
commit;
|
|
|
|
# Flush all dirty pages from buffer pool
|
|
SET @no_checkpoint_save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
|
|
SET @no_checkpoint_save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
|
|
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
|
|
SET GLOBAL innodb_max_dirty_pages_pct=0.0;
|
|
SET GLOBAL innodb_max_dirty_pages_pct= @no_checkpoint_save_pct;
|
|
SET GLOBAL innodb_max_dirty_pages_pct_lwm= @no_checkpoint_save_pct_lwm;
|
|
|
|
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;
|
|
# Kill the server
|
|
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys-not-found.txt
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
|
|
drop table t1,t2,t3,t4,t5;
|