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

Audit: log is only created when parameters are set in a certain order

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Logging only works if the output type is set after the file path.
      This example (as in the MTR test provided with the code) works:

      install soname 'server_audit';
       
      set global server_audit_logging=on;
      set global server_audit_file_path='my_audit.log';
      set global server_audit_output_type=file;
      set global server_audit_incl_ddl_users='root';
      create table t1 (id int);
      drop table t1;
       
      let $MYSQLD_DATADIR= `SELECT @@datadir`;
      --echo # Check if file exists:
      list_files $MYSQLD_DATADIR my_audit.log;
       
      uninstall soname 'server_audit';

      Output:

      ...
      # Check if file exists:
      my_audit.log
      uninstall soname 'server_audit';

      But this one does not (I switched setting of file_path and output_type):

      install soname 'server_audit';
       
      set global server_audit_logging=on;
      set global server_audit_output_type=file;
      set global server_audit_file_path='my_audit.log';
      set global server_audit_incl_ddl_users='root';
      create table t1 (id int);
      drop table t1;
       
      let $MYSQLD_DATADIR= `SELECT @@datadir`;
      --echo # Check if file exists:
      list_files $MYSQLD_DATADIR my_audit.log;
       
      uninstall soname 'server_audit';

      Output:

      ...
      # Check if file exists:
      uninstall soname 'server_audit';

      bzr version-info

      revision-id: holyfoot@askmonty.org-20130704123621-gb3jvhyxdax6gpm9
      revno: 3825
      branch-nick: 5.5-noga-hf

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.