Debian Codegraph @

mysql-test/suite/encryption/t/innodb-encryption-disable.test

raw
1 -- source include/have_innodb.inc
2 # embedded does not support restart
3 -- source include/not_embedded.inc
4 -- source filekeys_plugin_exists.inc
5
6 #
7 # MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table
8 #
9
10 call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
11 call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
12 call mtr.add_suppression("InnoDB: Recovery failed to read page");
13 call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
14 call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[15]\\.ibd'");
15 call mtr.add_suppression("InnoDB: File '.*test/t[15]\\.ibd' is corrupted");
16
17 # Suppression for builds where file_key_management plugin is linked statically
18 call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
19
20 --let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
21 --source include/restart_mysqld.inc
22
23 create table t5 (
24 `intcol1` int(32) DEFAULT NULL,
25 `intcol2` int(32) DEFAULT NULL,
26 `charcol1` varchar(128) DEFAULT NULL,
27 `charcol2` varchar(128) DEFAULT NULL,
28 `charcol3` varchar(128) DEFAULT NULL
29 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
30
31 insert into t5 values (1,2,'maria','db','encryption');
32
33 CREATE TABLE `t1` (
34 `intcol1` int(32) DEFAULT NULL,
35 `intcol2` int(32) DEFAULT NULL,
36 `charcol1` varchar(128) DEFAULT NULL,
37 `charcol2` varchar(128) DEFAULT NULL,
38 `charcol3` varchar(128) DEFAULT NULL
39 ) ENGINE=InnoDB;
40
41 insert into t1 values (1,2,'maria','db','encryption');
42 alter table t1 encrypted='yes' `encryption_key_id`=1;
43
44 --let $restart_parameters=--innodb-encrypt-tables=OFF
45 --source include/restart_mysqld.inc
46
47 --error ER_TABLE_CORRUPT
48 select * from t1;
49 --error ER_TABLE_CORRUPT
50 select * from t5;
51
52 --let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
53 --source include/restart_mysqld.inc
54
55 drop table t1;
56 drop table t5;