[MDEV-7500] thread_handling option in my.cnf is not passing "connect events" to audit plugin Created: 2015-01-24  Updated: 2015-06-08  Resolved: 2015-06-08

Status: Closed
Project: MariaDB Server
Component/s: Plugin - Audit
Affects Version/s: 5.5, 10.0
Fix Version/s: 5.5.44

Type: Bug Priority: Major
Reporter: Honza Horak Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: server_audit, verified
Environment:

Linux, Fedora


Sprint: 5.5.44

 Description   

Description of problem:
When using the option:

thread_handling = pool-of-threads

in my.cnf, connect events are not being passed to the server_audit.so plugin.

Steps to Reproduce:
1. Install the attached server_audit.so plugin.
2. Use the attached my.cnf configuration for mariadb.
3. Connect to the "test" database using mysql shell.
4. Exit mysql shell.

Actual results:
In /var/log/mariadb/server_audit.log, there will only be DISCONNECT messages:

20140604 15:36:40,rhel6base,root,localhost,2,0,DISCONNECT,,,0
20140604 15:36:52,rhel6base,root,localhost,3,0,DISCONNECT,test,,0

Expected results:
We expect to see CONNECT and DISCONNECT messages:

20140519 14:01:37,rhel6base,root,localhost,2,0,CONNECT,,,0
20140519 14:01:41,rhel6base,root,localhost,2,0,DISCONNECT,,,0
20140519 14:01:41,rhel6base,root,localhost,3,0,CONNECT,test,,0
20140519 14:01:45,rhel6base,root,localhost,3,0,DISCONNECT,test,,0

Additional info:

Config options used:

plugin-load = server_audit=server_audit.so
log-warnings = 2
server-audit-logging=ON
server-audit-events='connect'
server-audit-file-path=/var/log/mariadb/server_audit.log
server-audit-output = file
slow_query_log
thread_handling = pool-of-threads

This issue was originally reported as
https://bugzilla.redhat.com/show_bug.cgi?id=1105239



 Comments   
Comment by Elena Stepanova [ 2015-01-26 ]

Reproducible on audit plugin 1.2.0 as well.

Comment by Alexey Botchkov [ 2015-06-08 ]

That's the bug in the server - it didn't send the CONNECT notivication to the plugins in the threadpool mode.
Fixing patch: http://lists.askmonty.org/pipermail/commits/2015-June/008012.html

Generated at Thu Feb 08 07:20:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.