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

TRUNCATE TABLE generates implementation-specific audit events

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Won't Fix
    • 5.5.31
    • 5.5.32
    • None

    Description

      TRUNCATE TABLE is represented by "create" audit event for MyISAM / Aria / MEMORY, and by "write" event for InnoDB.
      As discussed on IRC, I'm filing it just in case, although probably it will be too complex to fix to worth the trouble.

      Partial test output:

      root[root] @ localhost []	>> truncate table t_inno
      root[root] @ localhost []	test.t_inno : write
      root[root] @ localhost []	>> truncate table t_myisam
      root[root] @ localhost []	test.t_myisam : create
      root[root] @ localhost []	>> truncate table t_aria
      root[root] @ localhost []	test.t_aria : create
      root[root] @ localhost []	>> truncate table t_memory
      root[root] @ localhost []	test.t_memory : create
      root[root] @ localhost []	>> uninstall plugin audit_null
      root[root] @ localhost []	mysql.plugin : write

      Test case:

      --source include/have_innodb.inc
       
      create table t_inno (i int) engine=InnoDB;
      create table t_myisam (i int) engine=MyISAM;
      create table t_aria (i int) engine=Aria;
      create table t_memory (i int) engine=MEMORY;
       
      install plugin audit_null soname 'adt_null';
       
      truncate table t_inno;
      truncate table t_myisam;
      truncate table t_aria;
      truncate table t_memory;
       
      uninstall plugin audit_null;
       
      drop table t_inno, t_myisam, t_aria, t_memory;
       
      let $MYSQLD_DATADIR= `SELECT @@datadir`;
      cat_file $MYSQLD_DATADIR/audit_null_tables.log;

      bzr version-info

      revision-id: sergii@pisem.net-20130521165635-k9lcq5g95glmrv6r
      revno: 3778
      branch-nick: 5.5

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.