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

A comma in a table or database name in a query breaks the record layout in the server_audit plugin log

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      Test case

      INSTALL PLUGIN server_audit SONAME 'server_audit';
      SET GLOBAL server_audit_output_type=file;
      SET GLOBAL server_audit_file_path='server_audit.log';
      SET GLOBAL server_audit_events='';
      SET GLOBAL server_audit_logging=ON;
       
      CREATE TABLE `comma,name` (c INT);
      INSERT INTO `comma,name` VALUES (1);
      SELECT c FROM `comma,name`;
      DROP TABLE `comma,name`;
      SET GLOBAL server_audit_logging=OFF;
      

      Audit log ( Ran bash script to get the field count)

      ramesh_sivaraman@ramesh-01:/test/MD140926-mariadb-10.11.19-linux-x86_64-opt$ /test/mtest/AUDIT_PLUGIN/tools/audit_field_count.sh data/server_audit.log
      === data/server_audit.log ===
      BROKEN      naive=11  quoted=11  op=CREATE       20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,8,CREATE,test,comma,name,
      RECOVERABLE naive=11  quoted=10  op=QUERY        20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,8,QUERY,test,'CREATE TABLE `comma,name` (c INT)',0
      BROKEN      naive=11  quoted=11  op=WRITE        20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,9,WRITE,test,comma,name,
      RECOVERABLE naive=11  quoted=10  op=QUERY        20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,9,QUERY,test,'INSERT INTO `comma,name` VALUES (1)',0
      BROKEN      naive=11  quoted=11  op=READ         20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,10,READ,test,comma,name,
      RECOVERABLE naive=11  quoted=10  op=QUERY        20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,10,QUERY,test,'SELECT c FROM `comma,name`',0
      BROKEN      naive=11  quoted=11  op=DROP         20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,11,DROP,test,comma,name,
      RECOVERABLE naive=11  quoted=10  op=QUERY        20260916 06:10:52,ramesh-01.c.mariadb-engineering-qa.internal,root,localhost,4,11,QUERY,test,'DROP TABLE `comma,name`',0
      

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.5h
                0.5h

                Git Integration

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