1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Jan Lindström
2018-02-08 14:55:01 +02:00
parent 627d33d9cf
commit 3969d97e6a
2 changed files with 15 additions and 65 deletions

View File

@ -27,16 +27,9 @@ foobar 2
# Restart server with keysbad3.txt
SELECT * FROM t1;
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;
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.
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
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;
@ -45,62 +38,30 @@ INSERT INTO t2 VALUES ('foobar',1,2);
# Restart server with keys2.txt
SELECT * FROM t2;
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;
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;
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);
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;
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;
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;
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;
Table Op Msg_type Msg_text
test.t2 optimize Error Table 'test.t2' doesn't exist in engine
test.t2 optimize status Operation failed
SHOW WARNINGS;
Level Code Message
ALTER TABLE t2 ADD COLUMN d INT;
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;
Table Op Msg_type Msg_text
test.t2 analyze Error Table 'test.t2' doesn't exist in engine
test.t2 analyze status Operation failed
SHOW WARNINGS;
Level Code Message
TRUNCATE TABLE t2;
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;
# Start server with keys2.txt

View File

@ -37,17 +37,16 @@ SELECT * FROM t1;
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- source include/restart_mysqld.inc
--disable_warnings
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--enable_warnings
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- source include/restart_mysqld.inc
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
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
@ -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
-- source include/restart_mysqld.inc
--disable_warnings
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE
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
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
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
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
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
UPDATE t2 set b = b +1;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
OPTIMIZE TABLE t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE
ALTER TABLE t2 ADD COLUMN d INT;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
ANALYZE TABLE t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE
TRUNCATE TABLE t2;
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
DROP TABLE t2;
--enable_warnings
--echo
--echo # Start server with keys2.txt