mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-11218: encryption.innodb_encryption_discard_import failed in buildbot
Try to stabilize test cases. These test behave badly when run in certain order.
This commit is contained in:
@ -19,8 +19,10 @@ let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
--enable_query_log
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
|
||||
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
|
||||
@ -115,26 +117,6 @@ SHOW CREATE TABLE t2;
|
||||
ALTER TABLE t3 ENGINE InnoDB;
|
||||
SHOW CREATE TABLE t3;
|
||||
|
||||
--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
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--sleep 5
|
||||
--echo # Tablespaces should be encrypted after alter table
|
||||
--let SEARCH_PATTERN=foobar
|
||||
--echo # t1 yes on expecting NOT FOUND
|
||||
-- let SEARCH_FILE=$t1_IBD
|
||||
-- source include/search_pattern_in_file.inc
|
||||
--let SEARCH_PATTERN=temp
|
||||
--echo # t2 ... on expecting NOT FOUND
|
||||
-- let SEARCH_FILE=$t2_IBD
|
||||
-- source include/search_pattern_in_file.inc
|
||||
--echo # t3 ... on expecting NOT FOUND
|
||||
--let SEARCH_PATTERN=barfoo
|
||||
-- let SEARCH_FILE=$t3_IBD
|
||||
-- source include/search_pattern_in_file.inc
|
||||
|
||||
--echo # Restarting server
|
||||
-- source include/restart_mysqld.inc
|
||||
--echo # Done restarting server
|
||||
@ -159,12 +141,23 @@ SELECT COUNT(1) FROM t3;
|
||||
-- let SEARCH_FILE=$t3_IBD
|
||||
-- source include/search_pattern_in_file.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
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo # Success!
|
||||
--echo # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
-- let $restart_parameters=--innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
DROP PROCEDURE innodb_insert_proc;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
# reset system
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
||||
--enable_query_log
|
||||
--enable_warnings
|
||||
|
Reference in New Issue
Block a user