diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-29 08:49:58 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-29 08:49:58 +0300 |
commit | ad9b3263d3c5e4784008cc748ae1af8494da3f05 (patch) | |
tree | 4372213bdfc4bf8a30c1e83de9d583e180bf8fa3 /mysql-test | |
parent | 7567b9fa10985a57339e8f0dbaf6e654c7f65c93 (diff) | |
download | mariadb-git-ad9b3263d3c5e4784008cc748ae1af8494da3f05.tar.gz |
MDEV-8391: encryption.innodb-page_encryption_compression fails
Test create_or_replace should make sure that background decrypt
operation is finished and flush all dirty pages using restart
to clean up the database before ending.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/encryption/r/create_or_replace.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/encryption/t/create_or_replace.opt | 1 | ||||
-rw-r--r-- | mysql-test/suite/encryption/t/create_or_replace.test | 31 |
3 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/suite/encryption/r/create_or_replace.result b/mysql-test/suite/encryption/r/create_or_replace.result index c30855a258b..54d41972e7c 100644 --- a/mysql-test/suite/encryption/r/create_or_replace.result +++ b/mysql-test/suite/encryption/r/create_or_replace.result @@ -13,5 +13,9 @@ INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc, table10_int_autoinc; +SET GLOBAL innodb_encrypt_tables = OFF; +SET GLOBAL innodb_encryption_threads = 4; +# Wait max 10 min for key encryption threads to decrypt all spaces +# Success! SET GLOBAL innodb_encryption_threads = 0; SET GLOBAL innodb_encrypt_tables = OFF; diff --git a/mysql-test/suite/encryption/t/create_or_replace.opt b/mysql-test/suite/encryption/t/create_or_replace.opt new file mode 100644 index 00000000000..7d3f2da7971 --- /dev/null +++ b/mysql-test/suite/encryption/t/create_or_replace.opt @@ -0,0 +1 @@ +--innodb-tablespaces-encryption diff --git a/mysql-test/suite/encryption/t/create_or_replace.test b/mysql-test/suite/encryption/t/create_or_replace.test index d515698d378..ca68f950588 100644 --- a/mysql-test/suite/encryption/t/create_or_replace.test +++ b/mysql-test/suite/encryption/t/create_or_replace.test @@ -105,5 +105,36 @@ drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc --disconnect con2 --enable_abort_on_error --enable_warnings + +SET GLOBAL innodb_encrypt_tables = OFF; +SET GLOBAL innodb_encryption_threads = 4; + +--echo # Wait max 10 min for key encryption threads to decrypt all spaces +let $cnt=600; +while ($cnt) +{ + let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0`; + if ($success) + { + let $cnt=0; + } + if (!$success) + { + real_sleep 1; + dec $cnt; + } +} +if (!$success) +{ + SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; + SHOW STATUS LIKE 'innodb_encryption%'; + -- die Timeout waiting for encryption threads +} +--echo # Success! + SET GLOBAL innodb_encryption_threads = 0; SET GLOBAL innodb_encrypt_tables = OFF; + +# Make sure that all dirty pages are flushed + +-- source include/restart_mysqld.inc |