From 2e7baca97d1f0c97dc3585dc0fd705d0da1bd1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 3 Oct 2016 08:22:52 +0300 Subject: [PATCH] Replace tablespace numbers to make repeatable. --- .../encryption/r/innodb-bad-key-change.result | 4 ++-- .../encryption/t/innodb-bad-key-change.test | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result index 84c8c2f6773..803c7aff597 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result @@ -39,12 +39,12 @@ 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 8 is encrypted but encryption service or used key_id is not available. Can't continue reading table. +Warning 192 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 2 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 DROP TABLE t1; Warnings: -Warning 192 Table in tablespace 8 encrypted.However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match. Can't continue opening the table. +Warning 192 encrypted.However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match. Can't continue opening the table. # Start server with keys.txt CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES; INSERT INTO t2 VALUES ('foobar',1,2); diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 9fd6ac3a011..f8d2294604c 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -56,10 +56,12 @@ SELECT * FROM t1; --error ER_GET_ERRMSG SELECT * FROM t1; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt -- source include/restart_mysqld.inc +--replace_regex /.*tablespace [0-9]*// DROP TABLE t1; # @@ -85,34 +87,46 @@ SELECT * FROM t2; SHOW WARNINGS; --error ER_GET_ERRMSG SELECT * FROM t2 where id = 1; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG SELECT * FROM t2 where b = 1; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG INSERT INTO t2 VALUES ('tmp',3,3); +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG DELETE FROM t2 where b = 3; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG DELETE FROM t2 where id = 3; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG UPDATE t2 set b = b +1; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; OPTIMIZE TABLE t2; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG ALTER TABLE t2 ADD COLUMN c INT; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; ANALYZE TABLE t2; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --error ER_GET_ERRMSG TRUNCATE TABLE t2; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; +--replace_regex /.*tablespace [0-9]*// --error ER_GET_ERRMSG DROP TABLE t2; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS; --echo @@ -120,5 +134,7 @@ SHOW WARNINGS; -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt -- source include/restart_mysqld.inc +--replace_regex /.*tablespace [0-9]*// DROP TABLE t2; +--replace_regex /.*tablespace [0-9]*// SHOW WARNINGS;