mirror of
https://github.com/MariaDB/server.git
synced 2025-02-13 17:05:35 +01:00
![Marko Mäkelä](/assets/img/avatar_default.png)
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.)
38 lines
1.6 KiB
Text
38 lines
1.6 KiB
Text
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
|
|
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.");
|
|
set global innodb_compression_algorithm = 1;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL,
|
|
`f` varchar(255) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
|
INSERT INTO t1 VALUES (1,'foobar'),(2,'barfoo');
|
|
FLUSH TABLE t1 FOR EXPORT;
|
|
# List before copying files
|
|
t1.cfg
|
|
t1.frm
|
|
t1.ibd
|
|
backup: t1
|
|
UNLOCK TABLES;
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
restore: t1 .ibd and .cfg files
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
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 CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL,
|
|
`f` varchar(255) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
|
SELECT * FROM t1;
|
|
ERROR HY000: Tablespace has been discarded for table `t1`
|
|
# Tablespaces should be still encrypted
|
|
# t1 yes on expecting NOT FOUND
|
|
NOT FOUND /foobar/ in t1.ibd
|
|
DROP TABLE t1;
|