Skip to content

Commit

Permalink
Tests: innodb_encryption detect table count
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok committed Dec 17, 2017
1 parent 656d6f3 commit 62b44b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mysql-test/suite/encryption/t/innodb_encryption.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ SHOW VARIABLES LIKE 'innodb_encrypt%';

SET GLOBAL innodb_encrypt_tables = ON;

--let $tables_count= `select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`

--echo # Wait max 10 min for key encryption threads to encrypt all spaces
--let $wait_timeout= 600
--let $wait_condition=SELECT COUNT(*) >= 5 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--source include/wait_condition.inc

SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
Expand Down Expand Up @@ -59,7 +61,7 @@ SET GLOBAL innodb_encryption_threads=@start_global_value;

--echo # Wait max 10 min for key encryption threads to encrypt all spaces
--let $wait_timeout= 600
--let $wait_condition=SELECT COUNT(*) >=5 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--source include/wait_condition.inc

SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
Expand Down

0 comments on commit 62b44b0

Please sign in to comment.