Details
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
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-260 auditing table accesses
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
yes, it's unfortunate, but truncate is implemented differently in different engines, and audit events reflect that.