Comment 10 for bug 1435606

Revision history for this message
monty solomon (monty+launchpad) wrote :

When audit-log = ON it writes to the log file but does not set the audit_log_file variable.

I started the server with the plugin uninstalled and these options in my.cnf

loose-audit-log = ON
loose-audit_log_file = /opt/mysql/dblogs1/test-p0/audit/audit.log
loose-audit_log_format = JSON
loose-audit_log_strategy = SEMISYNCHRONOUS

mysql> show variables like 'audit%';
Empty set (0.00 sec)

# ls -lt
-rw-rw---- 1 mysql mysql 0 Mar 31 05:19 audit.log

Then I executed the following

mysql -uroot -e "INSTALL PLUGIN audit_log SONAME 'audit_log.so'"

mysql> show variables like 'audit%';
+---------------------------+-----------------+
| Variable_name | Value |
+---------------------------+-----------------+
| audit_log_buffer_size | 1048576 |
| audit_log_file | |
| audit_log_flush | OFF |
| audit_log_format | JSON |
| audit_log_handler | FILE |
| audit_log_policy | ALL |
| audit_log_rotate_on_size | 0 |
| audit_log_rotations | 0 |
| audit_log_strategy | SEMISYNCHRONOUS |
| audit_log_syslog_facility | LOG_USER |
| audit_log_syslog_ident | percona-audit |
| audit_log_syslog_priority | LOG_INFO |
+---------------------------+-----------------+
12 rows in set (0.00 sec)

# ls -lt
-rw-rw---- 1 mysql mysql 3952 Mar 31 05:20 audit.log

# ls -lt
-rw-rw---- 1 mysql mysql 4974 Mar 31 05:20 audit.log