[MDEV-26225] server_audit_file_rotate_now defined as PLUGIN_VAR_OPCMDARG Created: 2021-07-23  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Plugin - Audit
Affects Version/s: None
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Ralf Gebhardt Assignee: Dmitry Shulga
Resolution: Unresolved Votes: 0
Labels: audit-plugin

Issue Links:
Relates

 Description   

The server_audit_file_rotate_now system variable is defined as PLUGIN_VAR_OPCMDARG:

static MYSQL_SYSVAR_BOOL(file_rotate_now, rotate, PLUGIN_VAR_OPCMDARG,
       "Force log rotation now.", NULL, rotate_log, FALSE);

Since it is defined as PLUGIN_VAR_OPCMDARG, it means that users can set the system variable on the command-line and in the configuration file. However, it does not make sense to set this system variables on the command-line or in the configuration file.

This system variable should probably defined as PLUGIN_VAR_NOCMDOPT instead.

UPDATE: In fact it makes sence to specify the file_rotate_now=on at a startup. It would mean that server starts the new log after restart.
The problem though is that it doesn't work now as expected. If one does this - sets --server_audit_file_rotate_now=ON the rotation doesn't happen. Instead the value of the file_rotate_now variable becomes 1. That should be fixed.


Generated at Thu Feb 08 09:43:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.