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

Server audit: Table events for partitioned tables are duplicated for each partition

    XMLWordPrintable

Details

    Description

      If a table is partitioned, every TABLE event is written into the server audit log 1 + N times, where N is the number of partitions.

      MariaDB [test]> create table t1 (i int) partition by hash (i) partitions 2;Query OK, 0 rows affected (0.22 sec)

      Audit

      20150113 19:53:42,wheezy-64,root,localhost,2,83,CREATE,test,t1,
      20150113 19:53:42,wheezy-64,root,localhost,2,83,CREATE,test,t1,
      20150113 19:53:42,wheezy-64,root,localhost,2,83,CREATE,test,t1,
      20150113 19:53:42,wheezy-64,root,localhost,2,83,CREATE,test,t1,
      20150113 19:53:42,wheezy-64,root,localhost,2,83,CREATE,test,t1,
      20150113 19:53:42,wheezy-64,root,localhost,2,83,CREATE,test,t1,
      20150113 19:53:42,wheezy-64,root,localhost,2,83,QUERY,test,'create table t1 (i int) partition by hash (i) partitions 5',0

      MariaDB [test]> select * from t1;
      Empty set (0.00 sec)

      Audit

      20150113 19:53:47,wheezy-64,root,localhost,2,84,READ,test,t1,
      20150113 19:53:47,wheezy-64,root,localhost,2,84,READ,test,t1,
      20150113 19:53:47,wheezy-64,root,localhost,2,84,READ,test,t1,
      20150113 19:53:47,wheezy-64,root,localhost,2,84,READ,test,t1,
      20150113 19:53:47,wheezy-64,root,localhost,2,84,READ,test,t1,
      20150113 19:53:47,wheezy-64,root,localhost,2,84,READ,test,t1,
      20150113 19:53:47,wheezy-64,root,localhost,2,84,QUERY,test,'select * from t1',0

      MariaDB [test]> insert into t1 values (1);
      Query OK, 1 row affected (0.07 sec)

      Audit

      20150113 19:53:55,wheezy-64,root,localhost,2,85,WRITE,test,t1,
      20150113 19:53:55,wheezy-64,root,localhost,2,85,WRITE,test,t1,
      20150113 19:53:55,wheezy-64,root,localhost,2,85,WRITE,test,t1,
      20150113 19:53:55,wheezy-64,root,localhost,2,85,WRITE,test,t1,
      20150113 19:53:55,wheezy-64,root,localhost,2,85,WRITE,test,t1,
      20150113 19:53:55,wheezy-64,root,localhost,2,85,WRITE,test,t1,
      20150113 19:53:55,wheezy-64,root,localhost,2,85,QUERY,test,'insert into t1 values (1)',0

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

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