1INSTALL PLUGIN test_security_context SONAME 'test_security_context.so';
2SELECT PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS
3WHERE PLUGIN_NAME='test_security_context';
4PLUGIN_STATUS
5ACTIVE
6SET @@test_security_context_get_field = "user", @@test_security_context_get_value = "root";
7SELECT "OK";
8OK
9OK
10SET @@test_security_context_get_field = "user", @@test_security_context_get_value = "root-err";
11SELECT "FAIL";
12ERROR HY000: Aborted by Audit API ('MYSQL_AUDIT_COMMAND_START';1).
13SET @@test_security_context_get_field = "host", @@test_security_context_get_value = "localhost";
14SELECT "OK";
15OK
16OK
17SET @@test_security_context_get_field = "ip";
18SELECT "OK";
19OK
20OK
21SET @@test_security_context_get_field = "priv_user", @@test_security_context_get_value = "root";
22SELECT "OK";
23OK
24OK
25SET @@test_security_context_get_field = "priv_host", @@test_security_context_get_value = "localhost";
26SELECT "OK";
27OK
28OK
29SET @@test_security_context_get_field = "sec_ctx_test";
30SELECT "OK";
31OK
32OK
33UNINSTALL PLUGIN test_security_context;
34Warnings:
35Warning	1620	Plugin is busy and will be uninstalled on shutdown
36