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.)
51 lines
2.4 KiB
Text
51 lines
2.4 KiB
Text
SET GLOBAL innodb_encrypt_tables = ON;
|
|
SET GLOBAL innodb_encryption_threads = 4;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=4;
|
|
Warnings:
|
|
Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 4 when encryption is disabled
|
|
DROP TABLE t1;
|
|
set innodb_default_encryption_key_id = 99;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
|
|
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available
|
|
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
|
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=YES;
|
|
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available
|
|
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
|
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
|
set innodb_default_encryption_key_id = 4;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=YES;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c` varchar(256) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c` varchar(256) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTION_KEY_ID`=4
|
|
CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=1;
|
|
Warnings:
|
|
Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 1 when encryption is disabled
|
|
ALTER TABLE t1 ENCRYPTION_KEY_ID=99;
|
|
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available
|
|
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
|
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
|
set innodb_default_encryption_key_id = 1;
|
|
drop table t1,t2;
|