summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-07-02 21:44:58 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-07-02 21:44:58 +0300
commit7a3d34d6456ed719da62a896e5ac6e983b72f3d8 (patch)
tree38dc1133cd53a366e7a851cfba6dad1269dcd5a1 /mysql-test/suite/encryption
parentfaeaf978b8c1deaa61d7d408fa6cb4ed03bfcfa3 (diff)
parent1d45b3b055511d58c1e820ad497793f30871586e (diff)
downloadmariadb-git-7a3d34d6456ed719da62a896e5ac6e983b72f3d8.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite/encryption')
-rw-r--r--mysql-test/suite/encryption/r/debug_key_management.result1
-rw-r--r--mysql-test/suite/encryption/r/innochecksum.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-alter.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_log.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result19
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption.result2
-rw-r--r--mysql-test/suite/encryption/t/innochecksum.test5
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-alter.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt2
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test22
10 files changed, 53 insertions, 6 deletions
diff --git a/mysql-test/suite/encryption/r/debug_key_management.result b/mysql-test/suite/encryption/r/debug_key_management.result
index c06d2bb3965..911a369f0c6 100644
--- a/mysql-test/suite/encryption/r/debug_key_management.result
+++ b/mysql-test/suite/encryption/r/debug_key_management.result
@@ -4,6 +4,7 @@ show variables like 'innodb_encrypt%';
Variable_name Value
innodb_encrypt_log ON
innodb_encrypt_tables ON
+innodb_encrypt_temporary_tables OFF
innodb_encryption_rotate_key_age 2
innodb_encryption_rotation_iops 100
innodb_encryption_threads 4
diff --git a/mysql-test/suite/encryption/r/innochecksum.result b/mysql-test/suite/encryption/r/innochecksum.result
index 98bc92ec015..5dc6ed90acc 100644
--- a/mysql-test/suite/encryption/r/innochecksum.result
+++ b/mysql-test/suite/encryption/r/innochecksum.result
@@ -27,8 +27,7 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
# Run innochecksum on t2
# Run innochecksum on t3
# Run innochecksum on t6
-# In new checksum format, checksum calculated for whole page.
-# So It should affected.
+# Space ID mismatch
# Restore the original tables
# Corrupt FIL_DATA+10 (data)
# Run innochecksum on t2
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
index 8a4ab8088d5..934f0607958 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
@@ -96,7 +96,6 @@ connection default;
SET DEBUG_SYNC = 'now WAIT_FOR done';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
-# restart
disconnect con1;
select * from t1;
f1 f2
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log.result b/mysql-test/suite/encryption/r/innodb_encrypt_log.result
index d0c17ed09ae..ff5b7c15b8b 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_log.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_log.result
@@ -22,6 +22,8 @@ key (col_int_key),
key (col_char_key)
) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
CREATE TEMPORARY TABLE t LIKE t0;
+Warnings:
+Warning 1478 Ignoring encryption parameter during temporary table creation.
INSERT INTO t VALUES
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result
new file mode 100644
index 00000000000..9a291ae1354
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result
@@ -0,0 +1,19 @@
+SELECT variable_value into @old_encrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
+SELECT variable_value into @old_decrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
+CREATE TEMPORARY TABLE t1(f1 CHAR(200), f2 CHAR(200)) ENGINE=InnoDB;
+INSERT INTO t1 (f1,f2) SELECT '', '' FROM seq_1_to_8192;
+CREATE TEMPORARY TABLE t2(f1 CHAR(100), f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB;
+INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+8192
+SELECT variable_value > @old_encrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
+variable_value > @old_encrypted
+1
+SELECT variable_value > @old_decrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
+variable_value > @old_decrypted
+1
diff --git a/mysql-test/suite/encryption/r/innodb_encryption.result b/mysql-test/suite/encryption/r/innodb_encryption.result
index ab31eed5cf2..4ede82ebd38 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption.result
@@ -3,6 +3,7 @@ SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name Value
innodb_encrypt_log ON
innodb_encrypt_tables ON
+innodb_encrypt_temporary_tables OFF
innodb_encryption_rotate_key_age 15
innodb_encryption_rotation_iops 100
innodb_encryption_threads 4
@@ -58,6 +59,7 @@ SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name Value
innodb_encrypt_log ON
innodb_encrypt_tables OFF
+innodb_encrypt_temporary_tables OFF
innodb_encryption_rotate_key_age 15
innodb_encryption_rotation_iops 100
innodb_encryption_threads 0
diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test
index 0cc48e53fc9..0f44844c103 100644
--- a/mysql-test/suite/encryption/t/innochecksum.test
+++ b/mysql-test/suite/encryption/t/innochecksum.test
@@ -209,9 +209,8 @@ EOF
--exec $INNOCHECKSUM $t3_IBD
--echo # Run innochecksum on t6
---echo # In new checksum format, checksum calculated for whole page.
---echo # So It should affected.
---error $error_code
+--echo # Space ID mismatch
+--error 1
--exec $INNOCHECKSUM $t6_IBD
--enable_result_log
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index d9a0e4e95cd..f0177b2ca4e 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -123,6 +123,8 @@ SET DEBUG_SYNC = 'now WAIT_FOR done';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
+let $restart_parameters = --innodb_encryption_threads=2;
+let $restart_noprint = 2;
--let $shutdown_timeout= 0
--source include/restart_mysqld.inc
disconnect con1;
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt
new file mode 100644
index 00000000000..70797302d01
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt
@@ -0,0 +1,2 @@
+--innodb_buffer_pool_size=5M
+--innodb_encrypt_temporary_tables=1
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test
new file mode 100644
index 00000000000..779e77a4540
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test
@@ -0,0 +1,22 @@
+--source include/have_sequence.inc
+--source include/have_innodb.inc
+--source include/have_file_key_management_plugin.inc
+
+SELECT variable_value into @old_encrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
+
+SELECT variable_value into @old_decrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
+
+CREATE TEMPORARY TABLE t1(f1 CHAR(200), f2 CHAR(200)) ENGINE=InnoDB;
+INSERT INTO t1 (f1,f2) SELECT '', '' FROM seq_1_to_8192;
+
+CREATE TEMPORARY TABLE t2(f1 CHAR(100), f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB;
+INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192;
+
+SELECT COUNT(*) FROM t1;
+SELECT variable_value > @old_encrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
+
+SELECT variable_value > @old_decrypted FROM information_schema.global_status
+WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';