1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.

CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
This commit is contained in:
Alexey Botchkov
2021-03-27 22:54:18 +04:00
parent c0ca3c4ffa
commit 94dea8ef5b
3 changed files with 26 additions and 5 deletions

View File

@ -95,6 +95,7 @@ CREATE USER u1 IDENTIFIED BY 'pwd-123';
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
CREATE USER u3 IDENTIFIED BY '';
ALTER USER u3 IDENTIFIED BY 'pwd-456';
drop user u1, u2, u3;
set global server_audit_events='query_ddl';
@ -106,6 +107,11 @@ select 2;
/*! select 2*/;
/*comment*/ select 2;
drop table t1;
create procedure pr1() insert into test.t1 values ("foo", 42);
create function fn1(i int) returns int deterministic return i+1;
drop procedure pr1;
drop function fn1;
set global server_audit_events='query_ddl,query_dml';
create table t1(id int);
insert into t1 values (1), (2);
@ -145,6 +151,10 @@ insert into t1 values (1), (2);
select * from t1;
select 2;
drop table t1;
create procedure pr1() insert into test.t1 values ("foo", 42);
create function fn1(i int) returns int deterministic return i+1;
drop procedure pr1;
drop function fn1;
set global server_audit_events='table';
set global server_audit_incl_users='user1';