1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-8764: Wrong error when encrypted table can't be decrypted.

Add a new error message when table is encrypted but decryption
fails. Use this new error message on InnoDB/XtraDB.
This commit is contained in:
Jan Lindström
2015-09-14 08:27:14 +03:00
parent 27ec0e159b
commit d581ef5b2c
30 changed files with 246 additions and 145 deletions

View File

@ -7,10 +7,20 @@ call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
select * from t1;
alter table t1 discard tablespace;
alter table t1 engine=InnoDB;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
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 155 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1932 Table 'test.t1' doesn't exist in engine
Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Warning 192 Table test/t1 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 discard 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 warnings;
Level Code Message
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 test/t1 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