| 1 |
# Setup test to use keyring component |
| 2 |
|
| 3 |
--echo # ---------------------------------------------------------------------- |
| 4 |
--echo # Setup |
| 5 |
|
| 6 |
--let PLUGIN_DIR_OPT = $KEYRING_FILE_COMPONENT_OPT |
| 7 |
|
| 8 |
# Data directory location |
| 9 |
--let CURRENT_DATADIR = `SELECT @@datadir` |
| 10 |
|
| 11 |
--let COMPONENT_LIBRARY = `SELECT SUBSTRING_INDEX('$KEYRING_FILE_COMPONENT_LOAD', '=', -1)` |
| 12 |
--let COMPONENT_DIR = $KEYRING_FILE_COMPONENT_DIR |
| 13 |
--let COMPONENT_NAME = `SELECT SUBSTRING_INDEX('$COMPONENT_LIBRARY', '.', 1)` |
| 14 |
|
| 15 |
# Create local keyring config |
| 16 |
--let KEYRING_FILE_PATH = `SELECT CONCAT( '$MYSQLTEST_VARDIR', '/keyring_file')` |
| 17 |
--let KEYRING_CONFIG_CONTENT = `SELECT CONCAT('{ \"path\": \"', '$KEYRING_FILE_PATH','\", \"read_only\": false }')` |
| 18 |
--source include/keyring_tests/helper/local_keyring_create_config.inc |
| 19 |
|
| 20 |
# Create local manifest file for current server instance |
| 21 |
--let LOCAL_MANIFEST_CONTENT = `SELECT CONCAT('{ \"components\": \"file://', '$COMPONENT_NAME', '\" }')` |
| 22 |
--source include/keyring_tests/helper/instance_create_manifest.inc |
| 23 |
|
| 24 |
# Restart server with manifest file |
| 25 |
--source include/keyring_tests/helper/start_server_with_manifest.inc |
| 26 |
--echo # ---------------------------------------------------------------------- |
| 27 |
|