1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-23776: Split encryption.create_or_replace

Let us shrink the test encryption.create_or_replace so that it can
run on the CI system, also on the embedded server.

encryption.create_or_replace_big: Renamed from the original test,
with the subset of encryption.create_or_replace omitted.
This commit is contained in:
Marko Mäkelä
2020-09-21 16:14:35 +03:00
parent e33f7b6faa
commit a9d8f5c1a5
3 changed files with 2 additions and 65 deletions

View File

@@ -12,15 +12,8 @@ INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL);
INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 ); INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 );
INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 );
INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 );
connect con1,localhost,root,,test;
connect con2,localhost,root,,test;
connection default;
drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc, table10_int_autoinc;
disconnect con1;
disconnect con2;
SET GLOBAL innodb_encrypt_tables = OFF;
SET GLOBAL innodb_encryption_threads = 4;
# Wait max 10 min for key encryption threads to decrypt all spaces # Wait max 10 min for key encryption threads to decrypt all spaces
# Success! # Success!
SET GLOBAL innodb_encryption_threads = 0; SET GLOBAL innodb_encryption_threads = 0;
SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encrypt_tables = OFF;
DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc;

View File

@@ -55,62 +55,6 @@ INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), (
INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 );
INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 );
--connect (con1,localhost,root,,test)
--connect (con2,localhost,root,,test)
--disable_abort_on_error
--disable_warnings
--disable_query_log
let $i = 500;
while ($i)
{
connection con1;
send SET GLOBAL innodb_encrypt_tables = ON;
connection default;
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`;
connection con2;
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`;
connection default;
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table0_int_autoinc`;
connection con1;
--reap;
send SET GLOBAL innodb_encrypt_tables = OFF;
connection con2;
--reap;
connection default;
--reap;
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`;
connection con2;
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`;
connection con1;
--reap;
send SET GLOBAL innodb_encrypt_tables = ON;
connection default;
--reap;
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`;
connection con2;
--reap;
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`;
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table0_int_autoinc`;
connection con1;
--reap;
connection default;
--reap;
dec $i;
}
--enable_query_log
connection default;
drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc, table10_int_autoinc;
--disconnect con1
--disconnect con2
--enable_abort_on_error
--enable_warnings
SET GLOBAL innodb_encrypt_tables = OFF;
SET GLOBAL innodb_encryption_threads = 4;
--echo # Wait max 10 min for key encryption threads to decrypt all spaces --echo # Wait max 10 min for key encryption threads to decrypt all spaces
let $cnt=600; let $cnt=600;
while ($cnt) while ($cnt)
@@ -137,6 +81,6 @@ if (!$success)
SET GLOBAL innodb_encryption_threads = 0; SET GLOBAL innodb_encryption_threads = 0;
SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encrypt_tables = OFF;
# Make sure that all dirty pages are flushed DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc;
-- source include/restart_mysqld.inc -- source include/restart_mysqld.inc