1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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

@@ -21,7 +21,7 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th
call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem.");
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("mysqld: File .*");
call mtr.add_suppression("InnoDB: Tablespace id 6 is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace.");
call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace.");
--echo
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
@@ -52,7 +52,7 @@ SELECT * FROM t1;
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- source include/restart_mysqld.inc
--error 1932
--error ER_GET_ERRMSG
SELECT * FROM t1;
SHOW WARNINGS;
@@ -77,38 +77,38 @@ INSERT INTO t2 VALUES ('foobar',1,2);
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
--error 1932,1712
--error ER_GET_ERRMSG
SELECT * FROM t2;
SHOW WARNINGS;
--error 1932,1712
--error ER_GET_ERRMSG
SELECT * FROM t2 where id = 1;
SHOW WARNINGS;
--error 1932,1712
--error ER_GET_ERRMSG
SELECT * FROM t2 where b = 1;
SHOW WARNINGS;
--error 1932
--error ER_GET_ERRMSG
INSERT INTO t2 VALUES ('tmp',3,3);
SHOW WARNINGS;
--error 1932,1712
--error ER_GET_ERRMSG
DELETE FROM t2 where b = 3;
SHOW WARNINGS;
--error 1932,1712
--error ER_GET_ERRMSG
DELETE FROM t2 where id = 3;
SHOW WARNINGS;
--error 1932,1712
--error ER_GET_ERRMSG
UPDATE t2 set b = b +1;
SHOW WARNINGS;
OPTIMIZE TABLE t2;
SHOW WARNINGS;
--error 1932
--error ER_GET_ERRMSG
ALTER TABLE t2 ADD COLUMN c INT;
SHOW WARNINGS;
ANALYZE TABLE t2;
SHOW WARNINGS;
--error 1932
--error ER_GET_ERRMSG
TRUNCATE TABLE t2;
SHOW WARNINGS;
--error 1036
--error ER_GET_ERRMSG
DROP TABLE t2;
SHOW WARNINGS;