Debian Codegraph @

mysql-test/suite/encryption/r/innodb-bad-key-change3.result

raw
1 call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
2 call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
3 set global innodb_compression_algorithm = 1;
4 CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
5 SHOW WARNINGS;
6 Level Code Message
7 SHOW CREATE TABLE t1;
8 Table Create Table
9 t1 CREATE TABLE `t1` (
10 `pk` int(11) NOT NULL,
11 `f` varchar(255) DEFAULT NULL,
12 PRIMARY KEY (`pk`)
13 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `PAGE_COMPRESSED`=1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
14 INSERT INTO t1 VALUES (1,'foobar'),(2,'barfoo');
15 FLUSH TABLE t1 FOR EXPORT;
16 # List before copying files
17 db.opt
18 t1.cfg
19 t1.frm
20 t1.ibd
21 backup: t1
22 UNLOCK TABLES;
23 ALTER TABLE t1 DISCARD TABLESPACE;
24 restore: t1 .ibd and .cfg files
25 # restart
26 ALTER TABLE t1 IMPORT TABLESPACE;
27 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
28 SHOW CREATE TABLE t1;
29 Table Create Table
30 t1 CREATE TABLE `t1` (
31 `pk` int(11) NOT NULL,
32 `f` varchar(255) DEFAULT NULL,
33 PRIMARY KEY (`pk`)
34 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `PAGE_COMPRESSED`=1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
35 SELECT * FROM t1;
36 ERROR HY000: Tablespace has been discarded for table `t1`
37 # Tablespaces should be still encrypted
38 # t1 yes on expecting NOT FOUND
39 NOT FOUND /foobar/ in t1.ibd
40 DROP TABLE t1;