Audit plugin doesn't handle failed write operations

Description

When audit plugin is unable to write data it silently ignores that fact.

Steps to reproduce:

my.cnf:

1)

2) Start MySQL

3) After starting

OR

mount 1MB partition to /tmp/mysql and execute queries as long as you hit no space left on this partition.

4) Execute any query - the query will execute, audit record won't be written to an audit_log_file, no information would be logged in.

Recommended solution:

Allow stopping/crashing/assert database if an audit plugin is not able to write an audit record. 

Environment

None

AFFECTED CS IDs

274081

Smart Checklist

Activity

Show:

Julia Vural April 2, 2025 at 12:12 PM

Can we check if it happens with the new Audit log filter component?

Peter Schwaller March 3, 2020 at 1:29 PM

I can see that some users would feel so strongly about their audit logs that they would prefer the database to crash if they are missing entries.  However, I can also see other users being really angry that an intermittent problem with the audit log writing causes their production database to crash.  

Seems like we need a user configurable option surrounding this, defaulting to the current behavior (don't crash).

Lalit Choudhary March 3, 2020 at 12:37 PM

Hi Iwo,

Thank you for the report and test case.

 Verified as described.

Details

Assignee

Reporter

Affects versions

Priority

Smart Checklist

Created March 3, 2020 at 12:02 PM
Updated April 2, 2025 at 12:12 PM