1call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
2call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
3call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
4call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
5# Restart mysqld --file-key-management-filename=keys2.txt
6SET GLOBAL innodb_file_per_table = ON;
7set GLOBAL innodb_default_encryption_key_id=4;
8create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
9create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
10create table t3(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no;
11Warnings:
12Warning	140	InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
13insert into t1 values (1, repeat('secret',6000));
14insert into t2 values (1, repeat('secret',6000));
15insert into t3 values (1, repeat('secret',6000));
16# Restart mysqld --file-key-management-filename=keys3.txt
17select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
18ERROR 42S02: Table 'test.t1' doesn't exist in engine
19select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
20ERROR 42S02: Table 'test.t2' doesn't exist in engine
21select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
22count(*)
231
24# Restart mysqld --file-key-management-filename=keys2.txt
25drop table t1,t2,t3;
26