diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-09-16 13:38:50 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-09-16 13:38:50 +0300 |
commit | 5ed6062edb8d399f2dbd4d55a6ed527935619f71 (patch) | |
tree | 29d9d28be9b205440a3b366ae7056286574b6eb3 | |
parent | 65d26d1f31070b5b9c05eba4eb8f4432e56055e0 (diff) | |
download | mariadb-git-bb-10.1-MDEV-12634.tar.gz |
MDEV-12634: Uninitialised ROW_MERGE_RESERVE_SIZE bytes written to temporary filebb-10.1-MDEV-12634
Improve testing by using innodb-log-encryption combinations for
innodb-index-online and innodb-table-online tests.
Remove unnecessary test and instrumentation.
8 files changed, 17 insertions, 128 deletions
diff --git a/mysql-test/suite/encryption/include/innodb-log-encryption.combinations b/mysql-test/suite/encryption/include/innodb-log-encryption.combinations new file mode 100644 index 00000000000..a59fbb62335 --- /dev/null +++ b/mysql-test/suite/encryption/include/innodb-log-encryption.combinations @@ -0,0 +1,11 @@ +[encrypt=ON] +innodb-encrypt-tables=ON +innodb-encrypt-log=ON +innodb-encryption-rotate-key-age=15 +innodb-encryption-threads=4 +innodb-tablespaces-encryption + +[encrypt=OFF] +innodb-encrypt-tables=OFF +innodb-encrypt-log=OFF + diff --git a/mysql-test/suite/encryption/include/innodb-log-encryption.inc b/mysql-test/suite/encryption/include/innodb-log-encryption.inc new file mode 100644 index 00000000000..542e046efd7 --- /dev/null +++ b/mysql-test/suite/encryption/include/innodb-log-encryption.inc @@ -0,0 +1,4 @@ +--source have_example_key_management_plugin.inc +# The goal of including this file is to enable innodb-log-encryption combinations +# (see include/innodb-log-encencryption.combinations) + diff --git a/mysql-test/suite/encryption/r/innodb-rowlog.result b/mysql-test/suite/encryption/r/innodb-rowlog.result deleted file mode 100644 index 873041ab421..00000000000 --- a/mysql-test/suite/encryption/r/innodb-rowlog.result +++ /dev/null @@ -1,30 +0,0 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -create table t1(id int not null primary key auto_increment, credit_card varchar(200), private varchar(50)) engine=innodb; -SET SESSION debug_dbug="+d,ib_merge_wait_after_read"; -alter table t1 add index secret (credit_card), ALGORITHM=INPLACE, LOCK=NONE; -SET GLOBAL innodb_encryption_rotate_key_age = 1; -create table t2(id int) engine=innodb; -SET SESSION debug_dbug="+d,ib_merge_wait_after_read"; -alter table t1 add index secret2 (private), ALGORITHM=INPLACE, LOCK=NONE; -insert into t1(credit_card) select credit_card from t1; -insert into t1(credit_card) select credit_card from t1; -insert into t1(credit_card) select credit_card from t1; -drop table t2; -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; -variable_value > 0 -1 -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted'; -variable_value > 0 -1 -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'; -variable_value > 0 -1 -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'; -variable_value > 0 -1 -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted'; -variable_value > 0 -1 -drop table t1; -SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_encryption_rotate_key_age=15; diff --git a/mysql-test/suite/encryption/t/innodb-rowlog.test b/mysql-test/suite/encryption/t/innodb-rowlog.test deleted file mode 100644 index 135293ef4b9..00000000000 --- a/mysql-test/suite/encryption/t/innodb-rowlog.test +++ /dev/null @@ -1,90 +0,0 @@ --- source include/have_innodb.inc --- source include/have_example_key_management_plugin.inc -# needs dbug_dbug --- source include/have_debug.inc - ---disable_warnings ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $key_age = `SELECT @@innodb_encryption_rotate_key_age`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; ---enable_warnings - -let $MYSQLD_DATADIR = `SELECT @@datadir`; -let $MYSQLD_TMPDIR = `SELECT @@tmpdir`; - -# -# Create a table that will be encrypted and put some sensitive data to it (credit card numbers) -# - -create table t1(id int not null primary key auto_increment, credit_card varchar(200), private varchar(50)) engine=innodb; - -let $rows = 15000; ---disable_query_log -begin; -while ($rows) -{ - eval insert into t1 values(NULL, '0000-0000-0000-0000','private_data'); - dec $rows; -} -commit; ---enable_query_log - ---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 - -# -# Now we create secondary index for credit_card column in parallel we create new rows -# forcing alter table to wait so that row log is used. -# -SET SESSION debug_dbug="+d,ib_merge_wait_after_read"; -send alter table t1 add index secret (credit_card), ALGORITHM=INPLACE, LOCK=NONE; -# -# Force key rotation and create second index for same table -# -connect (con2,localhost,root,,); -SET GLOBAL innodb_encryption_rotate_key_age = 1; -create table t2(id int) engine=innodb; -SET SESSION debug_dbug="+d,ib_merge_wait_after_read"; -send alter table t1 add index secret2 (private), ALGORITHM=INPLACE, LOCK=NONE; -# -# Create new rows to row log -# -connect (con1,localhost,root,,); -insert into t1(credit_card) select credit_card from t1; -insert into t1(credit_card) select credit_card from t1; -insert into t1(credit_card) select credit_card from t1; - -connection default; -reap; -disconnect con1; - -connection con2; -reap; -drop table t2; - -connection default; -disconnect con2; - -let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED'; ---source include/wait_condition.inc - -# -# Verify that both merge blocks and row log blocks are encryted and decrypted -# - -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted'; -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'; -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'; -SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted'; - -drop table t1; - ---disable_warnings -eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; -eval SET GLOBAL innodb_encryption_rotate_key_age=$key_age; ---enable_warnings diff --git a/mysql-test/suite/innodb/t/innodb-index-online.test b/mysql-test/suite/innodb/t/innodb-index-online.test index 24e3cd1ba22..17485fe610c 100644 --- a/mysql-test/suite/innodb/t/innodb-index-online.test +++ b/mysql-test/suite/innodb/t/innodb-index-online.test @@ -1,5 +1,6 @@ --source include/innodb_page_size_small.inc --source include/have_debug_sync.inc +--source ../../suite/encryption/include/innodb-log-encryption.inc let $innodb_metrics_select= SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index ff5c55d9cd9..edfd6854ff4 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -1,6 +1,7 @@ --source include/innodb_page_size_small.inc --source include/have_debug.inc --source include/have_debug_sync.inc +--source ../../suite/encryption/include/innodb-log-encryption.inc let $innodb_metrics_select= SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index a91c0f67218..62dc98a3e30 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -4037,10 +4037,6 @@ row_merge_build_indexes( /* Now we have files containing index entries ready for sorting and inserting. */ - DBUG_EXECUTE_IF( - "ib_merge_wait_after_read", - os_thread_sleep(20000000);); /* 20 sec */ - for (i = 0; i < n_indexes; i++) { dict_index_t* sort_idx = indexes[i]; diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc index 28b43d6abef..1b0566dd2d3 100644 --- a/storage/xtradb/row/row0merge.cc +++ b/storage/xtradb/row/row0merge.cc @@ -4040,10 +4040,6 @@ row_merge_build_indexes( /* Now we have files containing index entries ready for sorting and inserting. */ - DBUG_EXECUTE_IF( - "ib_merge_wait_after_read", - os_thread_sleep(20000000);); /* 20 sec */ - for (i = 0; i < n_indexes; i++) { dict_index_t* sort_idx = indexes[i]; |