Audit_log_filter, Bug or no Bug?

interesting problem with the audit_log_filter, that may or may not be a bug, what do people think?

I have two databases set up as a source and a replica. I am using Row Based Replication.

If I run a DDL or DCL query on the Source database, it appears in the audit log for both the source and the replica, even though I only ran the query on the Source. So to all extents and purposes, it appears that someone has run the DDL/DCL query on all replica databases.

I’m assuming that because all DDL queries are replicated as statement based replication the audit log is seeing the statement being executed, even though it wasn’t really executed.

Is this a BUG, or just a rather annoying feature?

Hi. This is currently the behavior of audit log filter. It has also been reported here - Jira.

A workaround is to exclude the “skip-grants user@skip-grants host” internal user from auditing:

SELECT audit_log_filter_set_filter('log_disable', '{"filter": {"log": false}}');

SELECT audit_log_filter_set_user('skip-grants user@skip-grants host', 'log_disable');
1 Like