Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26225

server_audit_file_rotate_now defined as PLUGIN_VAR_OPCMDARG

    XMLWordPrintable

    Details

      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.

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            ralf.gebhardt@mariadb.com Ralf Gebhardt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration