summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innodb-page_encryption.test
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@skysql.com>2014-11-27 12:33:27 +0200
committerJan Lindström <jan.lindstrom@skysql.com>2014-11-27 12:33:27 +0200
commit7c0bf419da0a59590692e6079ad9e8c8a0c90b60 (patch)
treedc372e21dc93ed32397e9b481e83c37ac14ce898 /mysql-test/suite/innodb/t/innodb-page_encryption.test
parent5b7500ccb0e788eb1a56bb8abaf0114dacae3fed (diff)
downloadmariadb-git-bb-10.1-encryption.tar.gz
Fixed a bug on status variables and added basic tests for all newbb-10.1-encryption
configuration variables.
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb-page_encryption.test')
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_encryption.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb-page_encryption.test b/mysql-test/suite/innodb/t/innodb-page_encryption.test
index 4159f82af62..f2866e35dca 100644
--- a/mysql-test/suite/innodb/t/innodb-page_encryption.test
+++ b/mysql-test/suite/innodb/t/innodb-page_encryption.test
@@ -51,6 +51,11 @@ select count(*) from innodb_compressed where c1 < 1500000;
select count(*) from innodb_dynamic where c1 < 1500000;
select count(*) from innodb_redundant where c1 < 1500000;
+# Note there that these variables are updated only when real I/O is done, thus they are not reliable
+SELECT variable_value >= 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_encrypted';
+SELECT variable_value >= 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_decrypted';
+SELECT variable_value = 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_encryption_error';
+
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_format = `Barracuda`;
@@ -65,6 +70,10 @@ select count(*) from innodb_compressed where c1 < 1500000;
select count(*) from innodb_dynamic where c1 < 1500000;
select count(*) from innodb_redundant where c1 < 1500000;
+SELECT variable_value >= 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_encrypted';
+SELECT variable_value >= 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_decrypted';
+SELECT variable_value = 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_encryption_error';
+
alter table innodb_compact engine=innodb page_encryption=DEFAULT page_encryption_key=DEFAULT;
show create table innodb_compact;
alter table innodb_compressed engine=innodb page_encryption=DEFAULT page_encryption_key=DEFAULT;
@@ -93,6 +102,11 @@ select count(*) from innodb_compressed where c1 < 1500000;
select count(*) from innodb_dynamic where c1 < 1500000;
select count(*) from innodb_redundant where c1 < 1500000;
+# After alter+restart these should be 0
+SELECT variable_value = 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_encrypted';
+SELECT variable_value = 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_decrypted';
+SELECT variable_value = 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_page_encryption_error';
+
drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;