diff -urN mysql-5.7.39/mysql-test/suite/auth_sec/r/keyring_file_data_qa.result mysql-5.7.39.new/mysql-test/suite/auth_sec/r/keyring_file_data_qa.result
--- mysql-5.7.39/mysql-test/suite/auth_sec/r/keyring_file_data_qa.result	2022-06-08 16:37:43.000000000 +0800
+++ mysql-5.7.39.new/mysql-test/suite/auth_sec/r/keyring_file_data_qa.result	2022-06-08 16:37:43.000000000 +0800
@@ -1,48 +1,19 @@
-call mtr.add_suppression("\\[Error\\] Function 'keyring_file' already exists");
-call mtr.add_suppression("\\[Error\\] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.so'.");
 call mtr.add_suppression("keyring_file_data cannot be set to new value as the keyring file cannot be created/accessed in the provided path");
-call mtr.add_suppression("\\[Error\\] Plugin keyring_file reported: 'keyring_file initialization failure.");
-call mtr.add_suppression("Plugin keyring_file reported: 'Could not create keyring directory The keyring_file will stay unusable until correct path to the keyring directory gets provided");
 call mtr.add_suppression("Error while loading keyring content. The keyring might be malformed");
-call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*keyring' not found .*");
-call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File 'MYSQL_test_invalid/dir/' not found .*");
-call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'Error reading file '/' .*");
-INSTALL PLUGIN keyring_file SONAME 'keyring_file.so';
-SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
-FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file';
-PLUGIN_NAME	keyring_file
-PLUGIN_VERSION	1.0
-PLUGIN_STATUS	ACTIVE
-
-SET @@global.keyring_file_data='keyring_file';
+call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*/keyring' not found .*");
+call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*/bad_keyring_file_data/' not found .*");
 SELECT @@global.keyring_file_data;
 @@global.keyring_file_data
-keyring_file
-CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB;
+MYSQL_TMP_DIR/mysecret_keyring
 SET @@global.keyring_file_data= 'MYSQL_TMP_DIR/new_keyring_file_data';
 SELECT @@global.keyring_file_data;
 @@global.keyring_file_data
 MYSQL_TMP_DIR/new_keyring_file_data
-SET @@global.keyring_file_data='';
-ERROR 42000: Variable 'keyring_file_data' can't be set to the value of ''
-SET @@global.keyring_file_data=1;
-ERROR 42000: Incorrect argument type to variable 'keyring_file_data'
-SET @@global.keyring_file_data='/';
-ERROR 42000: Variable 'keyring_file_data' can't be set to the value of '/'
-SET @@session.keyring_file_data= '$MYSQL_TMP_DIR/new_keyring_file_data';
-ERROR HY000: Variable 'keyring_file_data' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@local.keyring_file_data= '$MYSQL_TMP_DIR/new_keyring_file_data';
-ERROR HY000: Variable 'keyring_file_data' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@global.keyring_file_data= 'MYSQL_test_invalid/dir/';
-ERROR 42000: Variable 'keyring_file_data' can't be set to the value of 'MYSQL_test_invalid/dir/'
+SET @@global.keyring_file_data= '../../../../../bad_dir/bad_keyring_file_data/';
+ERROR 42000: Variable 'keyring_file_data' can't be set to the value of '../../../../../bad_dir/bad_keyring_file_data/'
+SET @@global.keyring_file_data=NULL;
+ERROR 42000: Variable 'keyring_file_data' can't be set to the value of 'NULL'
 SELECT @@global.keyring_file_data;
 @@global.keyring_file_data
 MYSQL_TMP_DIR/new_keyring_file_data
-
-UNINSTALL PLUGIN keyring_file;
-SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
-FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file';
-
-DROP TABLE t1;
-
-#End:
+SET @@global.keyring_file_data= 'MYSQL_TMP_DIR/mysecret_keyring';
diff -urN mysql-5.7.39/mysql-test/suite/auth_sec/t/keyring_file_data_qa-master.opt mysql-5.7.39.new/mysql-test/suite/auth_sec/t/keyring_file_data_qa-master.opt
--- mysql-5.7.39/mysql-test/suite/auth_sec/t/keyring_file_data_qa-master.opt	2022-06-08 16:37:43.000000000 +0800
+++ mysql-5.7.39.new/mysql-test/suite/auth_sec/t/keyring_file_data_qa-master.opt	2023-07-10 16:29:43.681288993 +0800
@@ -1 +1 @@
-$KEYRING_PLUGIN_OPT --loose-keyring-file-data=$MYSQL_TMP_DIR/mydummy_key
+$KEYRING_PLUGIN_OPT $KEYRING_PLUGIN_LOAD --keyring_file_data=$MYSQL_TMP_DIR/mysecret_keyring
diff -urN mysql-5.7.39/mysql-test/suite/auth_sec/t/keyring_file_data_qa.test mysql-5.7.39.new/mysql-test/suite/auth_sec/t/keyring_file_data_qa.test
--- mysql-5.7.39/mysql-test/suite/auth_sec/t/keyring_file_data_qa.test	2022-06-08 16:37:43.000000000 +0800
+++ mysql-5.7.39.new/mysql-test/suite/auth_sec/t/keyring_file_data_qa.test	2023-07-10 16:29:23.489157079 +0800
@@ -1,66 +1,25 @@
-# WL5769
-# Keyring_file plugin and keyring_file_data variable testing.
-
 --disable_ps_protocol
 --disable_warnings
 --source include/not_embedded.inc
-call mtr.add_suppression("\\[Error\\] Function 'keyring_file' already exists");
-call mtr.add_suppression("\\[Error\\] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.so'.");
+
 call mtr.add_suppression("keyring_file_data cannot be set to new value as the keyring file cannot be created/accessed in the provided path");
-call mtr.add_suppression("\\[Error\\] Plugin keyring_file reported: 'keyring_file initialization failure.");
-call mtr.add_suppression("Plugin keyring_file reported: 'Could not create keyring directory The keyring_file will stay unusable until correct path to the keyring directory gets provided");
 call mtr.add_suppression("Error while loading keyring content. The keyring might be malformed");
-call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*keyring' not found .*");
-call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File 'MYSQL_test_invalid/dir/' not found .*");
-call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'Error reading file '/' .*");
+call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*/keyring' not found .*");
+call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*/bad_keyring_file_data/' not found .*");
 
-# Installing keyring plugin.
---replace_regex /\.dll/.so/
-eval INSTALL PLUGIN keyring_file SONAME '$KEYRING_PLUGIN';
-# Check keyring plugin
-query_vertical SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
-FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file';
---echo
-SET @@global.keyring_file_data='keyring_file';
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT @@global.keyring_file_data;
-# Creating table with encryption.
-CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB;
-
-# Setting keyring_file_data value to file.
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval SET @@global.keyring_file_data= '$MYSQL_TMP_DIR/new_keyring_file_data';
---file_exists $MYSQL_TMP_DIR/new_keyring_file_data
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT @@global.keyring_file_data;
-
-# Invalid values
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.keyring_file_data='';
---error ER_WRONG_TYPE_FOR_VAR
-SET @@global.keyring_file_data=1;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.keyring_file_data='/';
---error ER_WRONG_VALUE_FOR_VAR
---error ER_GLOBAL_VARIABLE
-SET @@session.keyring_file_data= '$MYSQL_TMP_DIR/new_keyring_file_data';
---error ER_GLOBAL_VARIABLE
-SET @@local.keyring_file_data= '$MYSQL_TMP_DIR/new_keyring_file_data';
-
-# Setting keyring_file_data value to dir.
 --Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.keyring_file_data= 'MYSQL_test_invalid/dir/';
+SET @@global.keyring_file_data= '../../../../../bad_dir/bad_keyring_file_data/';
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.keyring_file_data=NULL;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT @@global.keyring_file_data;
---echo
 
-UNINSTALL PLUGIN keyring_file;
-# Check keyring plugin
-query_vertical SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS
-FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file';
---file_exists $MYSQL_TMP_DIR/new_keyring_file_data
---echo
-
-# Cleanup
-DROP TABLE t1;
---echo
---echo #End:
+# cleanup
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+eval SET @@global.keyring_file_data= '$MYSQL_TMP_DIR/mysecret_keyring';
