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

CREATE / DROP PROCEDURE not logged with audit plugin

Details

    Description

      The commands

      DELIMITER //
       
      CREATE PROCEDURE simpleproc (OUT param1 INT)
       BEGIN
        SELECT COUNT(*) INTO param1 FROM t;
       END;
      //
       
      DELIMITER ;
       
      DROP PROCEDURE simpleproc ;
      

      will not be logged with

      set global server_audit_events = "CONNECT,QUERY_DDL,QUERY_DCL";

      also not with QUERY_DML

      set global server_audit_events = "CONNECT,QUERY_DDL,QUERY_DCL,QUERY_DML";

      with adding QUERY it works.

      set global server_audit_events = "CONNECT,QUERY_DDL,QUERY_DCL,QUERY_DML,QUERY";

      In the KB CREATE / DROP PROCEDURE will not classified as DDL.

      —except CREATE/DROP [PROCEDURE / FUNCTION / USER] and RENAME USER (they're not DDL)
      

      [https://mariadb.com/kb/en/mariadb-audit-plugin-log-settings/|
      https://mariadb.com/kb/en/mariadb-audit-plugin-log-settings/]

      Even if this would be true, it should be logged with adding QUERY_DML at least,
      but SQL standard classify it also as DDL.

      https://www.w3schools.in/mysql/ddl-dml-dcl/#DDL

      In MariaDB and SQL standard DROP / CREATE Procedures is classified as DDL.

      Attachments

        Activity

          Richard Richard Stracke created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Fix Version/s 10.5 [ 23123 ]
          Assignee Ralf Gebhardt [ ralf.gebhardt@mariadb.com ]
          julien.fritsch Julien Fritsch made changes -
          Assignee Ralf Gebhardt [ ralf.gebhardt@mariadb.com ] Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          julien.fritsch Julien Fritsch made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          holyfoot Alexey Botchkov made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          holyfoot Alexey Botchkov made changes -
          issue.field.resolutiondate 2021-03-29 14:33:32.0 2021-03-29 14:33:32.634
          holyfoot Alexey Botchkov made changes -
          Fix Version/s 10.3.29 [ 25206 ]
          Fix Version/s 10.5 [ 23123 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Fix Version/s 10.2.38 [ 25207 ]
          holyfoot Alexey Botchkov made changes -
          Fix Version/s 10.5.13 [ 26026 ]
          Fix Version/s 10.4.22 [ 26031 ]
          holyfoot Alexey Botchkov made changes -
          Fix Version/s 10.6.5 [ 26034 ]
          Richard Richard Stracke made changes -
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 112337 ] MariaDB v4 [ 158231 ]
          mariadb-jira-automation Jira Automation (IT) made changes -
          Zendesk Related Tickets 169206 166378

          People

            holyfoot Alexey Botchkov
            Richard Richard Stracke
            Votes:
            1 Vote for this issue
            Watchers:
            9 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.