summaryrefslogtreecommitdiff
path: root/plugin/server_audit
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-23 14:25:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-23 14:25:45 +0200
commitfa1aef39ebc7d84d24d4e3d2124f982526632ee9 (patch)
tree08c7c3badde31bf2d9613204846f07e02ce36f0a /plugin/server_audit
parent097786c485c6d10064e8bc593b6aa54e477712f9 (diff)
parent1eb59c307de163b507efade1fc372d8ff2bb94b7 (diff)
downloadmariadb-git-fa1aef39ebc7d84d24d4e3d2124f982526632ee9.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'plugin/server_audit')
-rw-r--r--plugin/server_audit/server_audit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index bb80e7aa74b..0ab8ea75b49 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -2069,13 +2069,9 @@ static void update_connection_info(struct connection_info *cn,
{
case MYSQL_AUDIT_CONNECTION_CONNECT:
setup_connection_connect(cn, event);
- if (event->status == 0 && event->proxy_user && event->proxy_user[0])
- log_proxy(cn, event);
break;
case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
*after_action= AA_CHANGE_USER;
- if (event->proxy_user && event->proxy_user[0])
- log_proxy(cn, event);
break;
default:;
}
@@ -2193,6 +2189,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
{
case MYSQL_AUDIT_CONNECTION_CONNECT:
log_connection(cn, event, event->status ? "FAILED_CONNECT": "CONNECT");
+ if (event->status == 0 && event->proxy_user && event->proxy_user[0])
+ log_proxy(cn, event);
break;
case MYSQL_AUDIT_CONNECTION_DISCONNECT:
if (use_event_data_for_disconnect)
@@ -2202,6 +2200,8 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
break;
case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
log_connection(cn, event, "CHANGEUSER");
+ if (event->proxy_user && event->proxy_user[0])
+ log_proxy(cn, event);
break;
default:;
}