[Commits] 9518ddd1fb4: MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND
revision-id: 9518ddd1fb4f811df369a0ac729d3fcacbf1aee9 (mariadb-10.1.32-54-g9518ddd1fb4) parent(s): d98514690fc647682ac06e7b09502b4274fa3e20 author: Jan Lindström committer: Jan Lindström timestamp: 2018-04-12 08:04:02 +0300 message: MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND Wait until rotation has ended and shutdown before grep to make sure that dirty pages are on datafiles. --- .../r/innodb_encryption_discard_import.result | 2 ++ .../t/innodb_encryption_discard_import.test | 27 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result index d08a6e943f4..a2a4f25b026 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result @@ -73,6 +73,8 @@ NOT FOUND /foobar/ in t1.ibd NOT FOUND /temp/ in t2.ibd # t3 ... on expecting NOT FOUND NOT FOUND /barfoo/ in t3.ibd +SET GLOBAL innodb_file_format = `Barracuda`; +SET GLOBAL innodb_file_per_table = ON; ALTER TABLE t1 ENGINE InnoDB; SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test index 192233a535f..29c762a5d0f 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test @@ -50,10 +50,12 @@ set autocommit=1; --echo # Wait max 10 min for key encryption threads to encrypt all spaces --let $wait_timeout= 600 ---let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING <> 0 --source include/wait_condition.inc ---sleep 5 +# shutdown so that grep is safe +--source include/shutdown_mysqld.inc + --echo # tablespaces should be now encrypted --let SEARCH_PATTERN=foobar --echo # t1 yes on expecting NOT FOUND @@ -68,7 +70,9 @@ set autocommit=1; -- let SEARCH_FILE=$t3_IBD -- source include/search_pattern_in_file.inc +--source include/start_mysqld.inc let MYSQLD_DATADIR =`SELECT @@datadir`; + --list_files $MYSQLD_DATADIR/test FLUSH TABLES t1, t2, t3 FOR EXPORT; perl; @@ -95,7 +99,9 @@ SELECT COUNT(1) FROM t2; ALTER TABLE t3 IMPORT TABLESPACE; SELECT COUNT(1) FROM t3; ---sleep 5 +# shutdown so that grep is safe +--source include/shutdown_mysqld.inc + --echo # tablespaces should remain encrypted after import --let SEARCH_PATTERN=foobar --echo # t1 yes on expecting NOT FOUND @@ -110,6 +116,13 @@ SELECT COUNT(1) FROM t3; -- let SEARCH_FILE=$t3_IBD -- source include/search_pattern_in_file.inc +--source include/start_mysqld.inc + +--disable_warnings +SET GLOBAL innodb_file_format = `Barracuda`; +SET GLOBAL innodb_file_per_table = ON; +--enable_warnings + ALTER TABLE t1 ENGINE InnoDB; SHOW CREATE TABLE t1; ALTER TABLE t2 ENGINE InnoDB; @@ -126,7 +139,9 @@ SELECT COUNT(1) FROM t1; SELECT COUNT(1) FROM t2; SELECT COUNT(1) FROM t3; ---sleep 5 +# shutdown so that grep is safe +--source include/shutdown_mysqld.inc + --echo # Tablespaces should be encrypted after restart --let SEARCH_PATTERN=foobar --echo # t1 yes on expecting NOT FOUND @@ -141,9 +156,11 @@ SELECT COUNT(1) FROM t3; -- let SEARCH_FILE=$t3_IBD -- source include/search_pattern_in_file.inc +--source include/start_mysqld.inc + --echo # Wait max 10 min for key encryption threads to encrypt all spaces --let $wait_timeout= 600 ---let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING <> 0 --source include/wait_condition.inc --echo # Success!
participants (1)
-
jan