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

The server_audit_file_buffer_size variable does not show correct values when set, and operates differently from other variables when undersized

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 12.0.1
    • Plugin - Audit
    • None
    • Can result in unexpected behaviour
    • Now the file_buffer_size is aligned to 8192.
    • Q3/2025 Maintenance

    Description

      In a MDEV-37089 dev comment, as well as via chat, holyfoot clarified that (summarized):

      • The size of the buffer is specified in bytes and how it is done now, a minimal buffer of 8k is used, irrespective of how much server_audit_buffer_size is specified [i.e. when less than 8k].

      This does not correspond with how this setting operates when compared with all other server settings:

      bb-12.0-mdev-34680x3-hf CS 12.0.1 8ead5a2a8a15a95f060e02d26c1ed28800fbdb03 (Optimized, Clang) Build 02/07/2025

      12.0.1-opt>SET GLOBAL server_audit_file_buffer_size=1;  # data/server_audit.log unchanged, OK
      Query OK, 0 rows affected (0.000 sec)
       
      12.0.1-opt>SELECT @@GLOBAL.server_audit_file_buffer_size\G
      *************************** 1. row ***************************
      @@GLOBAL.server_audit_file_buffer_size: 1
      1 row in set (0.000 sec)
      

      Normally, when a setting is undersized (less than minimum), and the server has to auto-resize it, a warning is produced, and subseqeuent readouts of the variable will show the correct value:

      bb-12.0-mdev-34680x3-hf CS 12.0.1 8ead5a2a8a15a95f060e02d26c1ed28800fbdb03 (Optimized, Clang) Build 02/07/2025

      12.0.1-opt>SET GLOBAL innodb_buffer_pool_size=1;
      Query OK, 0 rows affected, 1 warning (0.000 sec)
       
      12.0.1-opt>SHOW WARNINGS;
      +---------+------+--------------------------------------------------------+
      | Level   | Code | Message                                                |
      +---------+------+--------------------------------------------------------+
      | Warning | 1292 | Truncated incorrect innodb_buffer_pool_size value: '1' |
      +---------+------+--------------------------------------------------------+
      1 row in set (0.000 sec)
       
      12.0.1-opt>SELECT @@GLOBAL.innodb_buffer_pool_size\G
      *************************** 1. row ***************************
      @@GLOBAL.innodb_buffer_pool_size: 6291456
      1 row in set (0.000 sec)
      

      Proposed fix:

      1. Produce a warning similar to:

      Truncated incorrect server_audit_file_buffer_size value: '1'
      

      2. Auto-size the variable to the minimum value, so that it can be read back and provide a correct answer.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.