mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
069d0472b3
The issue was a bad merge of MDEV-12253 from 10.1 to 10.2
in commit f9cc391863
.
In that merge, I wrongly assumed that all test file conflicts
for mysql-test/suite/encryption had been properly resolved in
bb-10.2-MDEV-12253 (commit 76aa6be77635c7017459ce33b41c837c9acb606d)
while in fact, some files there had been copied from the 10.1 branch.
This commit is based on a manually done conflict resolution of
the mysql-test/suite/encryption on the same merge, applied to
the current 10.2 branch.
As part of this commit, the test encryption.innodb-bad-key-change4
which was shortly disabled due to MDEV-11336 will be re-enabled again.
(While the test enables innodb_defragment, it does not fail even though
enabling innodb_defragment currently has no effect.)
56 lines
3.8 KiB
Text
56 lines
3.8 KiB
Text
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
|
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
|
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
|
SET GLOBAL innodb_file_per_table = ON;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
|
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
|
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
|
SELECT * FROM t1;
|
|
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
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
|
Warning 192 Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
|
Error 1296 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
|
|
ALTER TABLE t1 ENGINE=InnoDB;
|
|
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
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Warning 192 Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
|
Error 1296 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
|
|
OPTIMIZE TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 optimize Warning Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
|
test.t1 optimize Error 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
|
|
test.t1 optimize error Corrupt
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
CHECK TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check Warning Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
|
test.t1 check Error 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
|
|
test.t1 check error Corrupt
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
FLUSH TABLES t1 FOR EXPORT;
|
|
backup: t1
|
|
UNLOCK TABLES;
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
Warnings:
|
|
Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
|
Warning 1812 Tablespace is missing for table 'test/t1'
|
|
restore: t1 .ibd and .cfg files
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
Warnings:
|
|
Warning 1814 Tablespace has been discarded for table `t1`
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL,
|
|
`f` varchar(8) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
|
RENAME TABLE t1 TO t1new;
|
|
ALTER TABLE t1new RENAME TO t2new;
|
|
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
|
|
DROP TABLE t1new;
|