Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Critical
 - 
    Resolution: Fixed
 - 
    5.5(EOL), 10.0(EOL)
 
- 
        Can result in unexpected behaviour
 - 
        Q3/2025 Maintenance, Q4/2025 Server Maintenance
 
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
			 |