[MDEV-7451] Server audit: Table events for partitioned tables are duplicated for each partition Created: 2015-01-13  Updated: 2023-04-24

Status: Open
Project: MariaDB Server
Component/s: Plugin - Audit
Affects Version/s: 5.5, 10.0
Fix Version/s: 5.5

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: server_audit


 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


Generated at Thu Feb 08 07:19:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.