Commit 3969d97e authored by Jan Lindström's avatar Jan Lindström

MDEV-14427: encryption.innodb-bad-key-change failed in buildbot

Timing problem as sometimes table is marked as encrypted but
sometimes we are not sure and table is just marked missing.
parent 627d33d9
...@@ -27,16 +27,9 @@ foobar 2 ...@@ -27,16 +27,9 @@ foobar 2
# Restart server with keysbad3.txt # Restart server with keysbad3.txt
SELECT * FROM t1; SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine ERROR 42S02: Table 'test.t1' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Warning 192 Table test/t1 in tablespace 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
DROP TABLE t1; DROP TABLE t1;
Warnings: Warnings:
Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table. Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
SHOW WARNINGS;
Level Code Message
Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
# Start server with keys3.txt # Start server with keys3.txt
SET GLOBAL innodb_default_encryption_key_id=5; SET GLOBAL innodb_default_encryption_key_id=5;
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES; CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
...@@ -45,62 +38,30 @@ INSERT INTO t2 VALUES ('foobar',1,2); ...@@ -45,62 +38,30 @@ INSERT INTO t2 VALUES ('foobar',1,2);
# Restart server with keys2.txt # Restart server with keys2.txt
SELECT * FROM t2; SELECT * FROM t2;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Warning 192 Table test/t2 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1932 Table 'test.t2' doesn't exist in engine
SELECT * FROM t2 where id = 1; SELECT * FROM t2 where id = 1;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
SELECT * FROM t2 where b = 1; SELECT * FROM t2 where b = 1;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
INSERT INTO t2 VALUES ('tmp',3,3); INSERT INTO t2 VALUES ('tmp',3,3);
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
DELETE FROM t2 where b = 3; DELETE FROM t2 where b = 3;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
DELETE FROM t2 where id = 3; DELETE FROM t2 where id = 3;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
UPDATE t2 set b = b +1; UPDATE t2 set b = b +1;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
OPTIMIZE TABLE t2; OPTIMIZE TABLE t2;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t2 optimize Error Table 'test.t2' doesn't exist in engine test.t2 optimize Error Table 'test.t2' doesn't exist in engine
test.t2 optimize status Operation failed test.t2 optimize status Operation failed
SHOW WARNINGS;
Level Code Message
ALTER TABLE t2 ADD COLUMN d INT; ALTER TABLE t2 ADD COLUMN d INT;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
ANALYZE TABLE t2; ANALYZE TABLE t2;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t2 analyze Error Table 'test.t2' doesn't exist in engine test.t2 analyze Error Table 'test.t2' doesn't exist in engine
test.t2 analyze status Operation failed test.t2 analyze status Operation failed
SHOW WARNINGS;
Level Code Message
TRUNCATE TABLE t2; TRUNCATE TABLE t2;
ERROR 42S02: Table 'test.t2' doesn't exist in engine ERROR 42S02: Table 'test.t2' doesn't exist in engine
SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t2' doesn't exist in engine
DROP TABLE t2; DROP TABLE t2;
# Start server with keys2.txt # Start server with keys2.txt
...@@ -37,17 +37,16 @@ SELECT * FROM t1; ...@@ -37,17 +37,16 @@ SELECT * FROM t1;
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
--disable_warnings
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t1; SELECT * FROM t1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 / --enable_warnings
SHOW WARNINGS;
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 / --replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
DROP TABLE t1; DROP TABLE t1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
# #
# MDEV-8591: Database page corruption on disk or a failed space, Assertion failure in file buf0buf.cc # MDEV-8591: Database page corruption on disk or a failed space, Assertion failure in file buf0buf.cc
...@@ -67,50 +66,40 @@ INSERT INTO t2 VALUES ('foobar',1,2); ...@@ -67,50 +66,40 @@ INSERT INTO t2 VALUES ('foobar',1,2);
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc
--disable_warnings
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t2; SELECT * FROM t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t2 where id = 1; SELECT * FROM t2 where id = 1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t2 where b = 1; SELECT * FROM t2 where b = 1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
INSERT INTO t2 VALUES ('tmp',3,3); INSERT INTO t2 VALUES ('tmp',3,3);
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
DELETE FROM t2 where b = 3; DELETE FROM t2 where b = 3;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
DELETE FROM t2 where id = 3; DELETE FROM t2 where id = 3;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
UPDATE t2 set b = b +1; UPDATE t2 set b = b +1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
OPTIMIZE TABLE t2; OPTIMIZE TABLE t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
ALTER TABLE t2 ADD COLUMN d INT; ALTER TABLE t2 ADD COLUMN d INT;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
ANALYZE TABLE t2; ANALYZE TABLE t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE --error ER_NO_SUCH_TABLE_IN_ENGINE
TRUNCATE TABLE t2; TRUNCATE TABLE t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
DROP TABLE t2; DROP TABLE t2;
--enable_warnings
--echo --echo
--echo # Start server with keys2.txt --echo # Start server with keys2.txt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment