| 1 |
disable_query_log; |
| 2 |
disable_result_log; |
| 3 |
# Copy PLUGIN_AUTH library to CONNECTION_CONTROL_OPT location |
| 4 |
let $auth_plugin_path= `SELECT SUBSTR('$PLUGIN_AUTH_OPT/$PLUGIN_AUTH', 14)`; |
| 5 |
let $connection_control_plugin_path= `SELECT SUBSTR('$CONNECTION_CONTROL_PLUGIN_OPT/$PLUGIN_AUTH', 14)`; |
| 6 |
|
| 7 |
if ($auth_plugin_path != $connection_control_plugin_path) |
| 8 |
{ |
| 9 |
--error 0, 1 |
| 10 |
--remove_file $connection_control_plugin_path |
| 11 |
--copy_file $auth_plugin_path $connection_control_plugin_path |
| 12 |
} |
| 13 |
# Install test_plugin_server |
| 14 |
eval INSTALL PLUGIN test_plugin_server SONAME '$PLUGIN_AUTH'; |
| 15 |
|
| 16 |
# Create proxied@localhost |
| 17 |
CREATE USER proxied@localhost IDENTIFIED BY 'proxied_password'; |
| 18 |
|
| 19 |
# Create u1@localhost, u2@localhost, u3@localhst |
| 20 |
CREATE USER u1@localhost IDENTIFIED WITH test_plugin_server AS 'proxied'; |
| 21 |
CREATE USER u2@localhost IDENTIFIED WITH test_plugin_server AS 'proxied'; |
| 22 |
CREATE USER u3@localhost IDENTIFIED WITH test_plugin_server AS 'proxied'; |
| 23 |
|
| 24 |
GRANT PROXY ON proxied@localhost TO u1@localhost, u2@localhost, u3@localhost; |
| 25 |
enable_result_log; |
| 26 |
enable_query_log; |