Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
voodam committed May 4, 2023
1 parent 8342f3d commit 8bf91c9
Show file tree
Hide file tree
Showing 31 changed files with 79 additions and 340 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
SET @@global.keyring_vault_config="MYSQLTEST_VARDIR/keyring_vault.conf";
# restart:<hidden args>
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB ENCRYPTION='y';
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ call mtr.add_suppression("keyring_vault initialization failure");
call mtr.add_suppression("A message intended for a client cannot be sent there as no client-session is attached");
--enable_query_log

--let $keyring_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --loose-keyring_vault_config=$vault_conf_file --innodb-sort-buffer-size=64k --innodb_encrypt_online_alter_logs=ON

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config="$vault_conf_file";
--let $keyring_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --keyring_vault_config=$vault_conf_file --innodb-sort-buffer-size=64k --innodb_encrypt_online_alter_logs=ON

--source include/innodb_online_alter_encryption.inc

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
SET @@global.keyring_vault_config="MYSQLTEST_VARDIR/keyring_vault.conf";
# restart:<hidden args>
CREATE TABLE t1(id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, credit_card VARCHAR(200), private VARCHAR(50)) ENGINE=InnoDB ENCRYPTION='y';
SET DEBUG_SYNC= 'ddl_after_scan SIGNAL opened WAIT_FOR rotated';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ call mtr.add_suppression("keyring_vault initialization failure");
call mtr.add_suppression("A message intended for a client cannot be sent there as no client-session is attached");
--enable_query_log

--let $keyring_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --loose-keyring_vault_config=$vault_conf_file --innodb-sort-buffer-size=64k --innodb_encrypt_online_alter_logs=ON

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config="$vault_conf_file";
--let $keyring_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --keyring_vault_config=$vault_conf_file --innodb-sort-buffer-size=64k --innodb_encrypt_online_alter_logs=ON

--source include/innodb_row_log_encryption.inc

Expand Down

This file was deleted.

6 changes: 1 addition & 5 deletions plugin/keyring_vault/tests/mtr/install_keyring_vault.result
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault1.conf';
ERROR HY000: Unknown system variable 'keyring_vault_config'
INSTALL PLUGIN keyring_vault SONAME 'keyring_vault.so';
Warnings:
Warning 42000 keyring_vault initialization failure. Please check the server log.
# restart:<hidden args>
SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault2.conf';
SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault1.conf';
UNINSTALL PLUGIN keyring_vault;
9 changes: 3 additions & 6 deletions plugin/keyring_vault/tests/mtr/install_keyring_vault.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ call mtr.add_suppression("for being a mount point unsuccessful - skipped.");
call mtr.add_suppression("for being a mount point successful - identified kv-v2 secret engine.");
--enable_query_log

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_UNKNOWN_SYSTEM_VARIABLE
eval SET @@global.keyring_vault_config='$conf_file1';

--replace_regex /\.dll/.so/
eval INSTALL PLUGIN keyring_vault SONAME '$KEYRING_VAULT_PLUGIN';
--let $restart_parameters = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --keyring_vault_config=$conf_file1
--let $do_not_echo_parameters = 1
--source include/restart_mysqld.inc

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config='$conf_file2';
Expand Down

This file was deleted.

8 changes: 2 additions & 6 deletions plugin/keyring_vault/tests/mtr/keyring_vault_config_qa.result
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
INSTALL PLUGIN keyring_vault SONAME 'keyring_vault.so';
Warnings:
Warning 42000 keyring_vault initialization failure. Please check the server log.
# restart:<hidden args>
SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_vault';
PLUGIN_NAME keyring_vault
PLUGIN_VERSION 1.0
PLUGIN_STATUS ACTIVE

SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault1.conf';
SELECT @@global.keyring_vault_config;
@@global.keyring_vault_config
MYSQLTEST_VARDIR/keyring_vault1.conf
Expand Down Expand Up @@ -44,6 +40,6 @@ UNINSTALL PLUGIN keyring_vault;
SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_vault';
DROP TABLE t1;
# restart
# restart:<hidden args>

#End:
9 changes: 4 additions & 5 deletions plugin/keyring_vault/tests/mtr/keyring_vault_config_qa.test
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ call mtr.add_suppression("for being a mount point successful - identified kv-v2
--enable_query_log

# Installing keyring plugin.
--replace_regex /\.dll/.so/
eval INSTALL PLUGIN keyring_vault SONAME '$KEYRING_VAULT_PLUGIN';
--let $restart_parameters = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --keyring_vault_config=$conf_file1
--let $do_not_echo_parameters = 1
--source include/restart_mysqld.inc

# Check keyring plugin
query_vertical SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_vault';
--echo
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config='$conf_file1';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SELECT @@global.keyring_vault_config;
# Creating table with encryption.
Expand Down

This file was deleted.

13 changes: 0 additions & 13 deletions plugin/keyring_vault/tests/mtr/keyring_vault_timeout.result

This file was deleted.

82 changes: 0 additions & 82 deletions plugin/keyring_vault/tests/mtr/keyring_vault_timeout.test

This file was deleted.

2 changes: 0 additions & 2 deletions plugin/keyring_vault/tests/mtr/rpl_key_rotation-master.opt

This file was deleted.

4 changes: 0 additions & 4 deletions plugin/keyring_vault/tests/mtr/rpl_key_rotation-slave.opt

This file was deleted.

18 changes: 8 additions & 10 deletions plugin/keyring_vault/tests/mtr/rpl_key_rotation.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault2.conf';
include/rpl_stop_server.inc [server_number=2]
include/rpl_stop_server.inc [server_number=1]
[On Master]
SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault1.conf';
include/rpl_start_server.inc [server_number=1]
[On Slave]
include/rpl_start_server.inc [server_number=2]
include/start_slave.inc
CHANGE REPLICATION SOURCE TO SOURCE_CONNECT_RETRY = 100;

ALTER INSTANCE ROTATE INNODB MASTER KEY;
Expand Down Expand Up @@ -70,8 +74,6 @@ INSERT INTO t4 VALUES(1, "rpltest");
START REPLICA SQL_THREAD;
include/wait_for_slave_sql_error.inc [errno=3185]
INSTALL PLUGIN keyring_vault SONAME 'keyring_vault.so';
Warnings:
Warning 42000 keyring_vault initialization failure. Please check the server log.
SET @@global.keyring_vault_config='MYSQLTEST_VARDIR/keyring_vault2.conf';
SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_vault';
Expand Down Expand Up @@ -99,21 +101,17 @@ ALTER INSTANCE ROTATE INNODB MASTER KEY;
ERROR HY000: Can't find master key from keyring, please check in the server log if a keyring is loaded and initialized successfully.
# Installing keyring_vault plugin on master.
INSTALL PLUGIN keyring_vault SONAME 'keyring_vault.so';
Warnings:
Warning 42000 keyring_vault initialization failure. Please check the server log.
# Cleanup
DROP TABLE t1,t2,t3,t4;
UNINSTALL PLUGIN keyring_vault;
include/sync_slave_sql_with_master.inc
include/rpl_restart_server.inc [server_number=1]
SELECT @@global.keyring_vault_config;
@@global.keyring_vault_config

ERROR HY000: Unknown system variable 'keyring_vault_config'
include/sync_slave_sql_with_master.inc
UNINSTALL PLUGIN keyring_vault;
include/rpl_restart_server.inc [server_number=2]
START REPLICA;
SELECT @@global.keyring_vault_config;
@@global.keyring_vault_config

ERROR HY000: Unknown system variable 'keyring_vault_config'
include/rpl_end.inc
30 changes: 26 additions & 4 deletions plugin/keyring_vault/tests/mtr/rpl_key_rotation.test
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,34 @@ call mtr.add_suppression("for being a mount point successful - identified kv-v2
--enable_query_log

--connection slave
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config='$conf_file2';
--let $rpl_server_number= 2
--source include/rpl_stop_server.inc

--connection master
--let $rpl_server_number= 1
--source include/rpl_stop_server.inc

--connection master
--echo [On Master]
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config='$conf_file1';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $KEYRING_PLUGIN keyring_vault.so $KEYRING_VAULT_PLUGIN_OPT KEYRING_VAULT_PLUGIN_OPT
--let $rpl_server_parameters= $KEYRING_VAULT_PLUGIN_LOAD $KEYRING_VAULT_PLUGIN_OPT --keyring_vault_config=$conf_file1
--let $rpl_server_number= 1
--let $rpl_omit_print_server_parameters= 1
--source include/rpl_start_server.inc

--connection slave
--echo [On Slave]
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $KEYRING_PLUGIN keyring_vault.so $KEYRING_VAULT_PLUGIN_OPT KEYRING_VAULT_PLUGIN_OPT
--let $rpl_server_parameters= $KEYRING_VAULT_PLUGIN_LOAD $KEYRING_VAULT_PLUGIN_OPT --keyring_vault_config=$conf_file2 --master-retry-count=60
--let $rpl_server_number= 2
--let $rpl_omit_print_server_parameters= 1
--source include/rpl_start_server.inc
--source include/start_slave.inc

--let $rpl_omit_print_server_parameters= 0
--let $rpl_server_parameters=

--connection master
CHANGE REPLICATION SOURCE TO SOURCE_CONNECT_RETRY = 100;

--echo
Expand Down Expand Up @@ -151,6 +171,7 @@ UNINSTALL PLUGIN keyring_vault;
--source include/rpl_restart_server.inc

--connection master
--error ER_UNKNOWN_SYSTEM_VARIABLE
SELECT @@global.keyring_vault_config;
--source include/sync_slave_sql_with_master.inc

Expand All @@ -163,6 +184,7 @@ UNINSTALL PLUGIN keyring_vault;

--connection slave
START REPLICA;
--error ER_UNKNOWN_SYSTEM_VARIABLE
SELECT @@global.keyring_vault_config;

--connection master
Expand Down
2 changes: 0 additions & 2 deletions plugin/keyring_vault/tests/mtr/table_encrypt_2-master.opt

This file was deleted.

2 changes: 1 addition & 1 deletion plugin/keyring_vault/tests/mtr/table_encrypt_2.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET @@global.keyring_vault_config = 'MYSQLTEST_VARDIR/keyring_vault1.conf';
# restart:<hidden args>
CREATE TABLE t1(c1 int) ENGINE=InnoDB ENCRYPTION="Y";
DROP TABLE t1;
# restart:<hidden args>
Expand Down
9 changes: 5 additions & 4 deletions plugin/keyring_vault/tests/mtr/table_encrypt_2.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ if (!$vault_conf_mount_point_directory)
--source mount_point_service.inc
}

--let $keyring1_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --loose-keyring_vault_config=$conf_file1
--let $keyring2_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --loose-keyring_vault_config=$conf_file2
--let $keyring1_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --keyring_vault_config=$conf_file1
--let $keyring2_restart_param = restart: $KEYRING_VAULT_PLUGIN_OPT $KEYRING_VAULT_PLUGIN_EARLY_LOAD --keyring_vault_config=$conf_file2

--disable_query_log
call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* Function 'keyring_vault' already exists");
Expand All @@ -40,8 +40,9 @@ call mtr.add_suppression("keyring_vault initialization failure");
call mtr.add_suppression("A message intended for a client cannot be sent there as no client-session is attached");
--enable_query_log

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET @@global.keyring_vault_config = '$conf_file1';
--let $restart_parameters = $keyring1_restart_param
--let $do_not_echo_parameters = 1
--source include/restart_mysqld.inc

--let $encryption_type = Y
--source include/table_encrypt_2.inc
Expand Down
Loading

0 comments on commit 8bf91c9

Please sign in to comment.