| 1 |
-- source include/innodb_page_size_small.inc |
| 2 |
-- source include/have_file_key_management_plugin.inc |
| 3 |
|
| 4 |
# embedded does not support restart |
| 5 |
-- source include/not_embedded.inc |
| 6 |
|
| 7 |
call 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; key_version=1"); |
| 8 |
call mtr.add_suppression("InnoDB: Recovery failed to read page"); |
| 9 |
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); |
| 10 |
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[12]\\.ibd'"); |
| 11 |
call mtr.add_suppression("InnoDB: File '.*test/t[12]\\.ibd' is corrupted"); |
| 12 |
call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted"); |
| 13 |
|
| 14 |
--echo # Restart mysqld --file-key-management-filename=keys2.txt |
| 15 |
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt |
| 16 |
-- source include/restart_mysqld.inc |
| 17 |
|
| 18 |
set GLOBAL innodb_default_encryption_key_id=4; |
| 19 |
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed; |
| 20 |
create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes; |
| 21 |
create table t3(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no; |
| 22 |
|
| 23 |
insert into t1 values (1, repeat('secret',6000)); |
| 24 |
insert into t2 values (1, repeat('secret',6000)); |
| 25 |
insert into t3 values (1, repeat('secret',6000)); |
| 26 |
|
| 27 |
--echo # Restart mysqld --file-key-management-filename=keys3.txt |
| 28 |
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt |
| 29 |
-- source include/restart_mysqld.inc |
| 30 |
|
| 31 |
--error ER_TABLE_CORRUPT |
| 32 |
select count(*) from t1 FORCE INDEX (b) where b like 'secret%'; |
| 33 |
--error ER_TABLE_CORRUPT |
| 34 |
select count(*) from t2 FORCE INDEX (b) where b like 'secret%'; |
| 35 |
select count(*) from t3 FORCE INDEX (b) where b like 'secret%'; |
| 36 |
|
| 37 |
--echo # Restart mysqld --file-key-management-filename=keys2.txt |
| 38 |
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt |
| 39 |
-- source include/restart_mysqld.inc |
| 40 |
|
| 41 |
drop table t1,t2,t3; |