INSTALL SONAME 'server_audit';
|
SET GLOBAL server_audit_logging=ON;
|
--let $datadir= `select @@datadir`
|
create user foo;
|
|
--connect (con1,localhost,root,,)
|
SELECT CURRENT_USER() AS should_be_root;
|
SET SESSION AUTHORIZATION foo@'%';
|
SELECT CURRENT_USER() AS should_be_foo;
|
--exec tail -n 4 $datadir/server_audit.log
|
|
--disconnect con1
|
--connection default
|
drop user foo;
|
UNINSTALL SONAME 'server_audit';
|
d4c600f804af677ac3177497b3770dbd67c448f7
|
connect con1,localhost,root,,;
|
SELECT CURRENT_USER() AS should_be_root;
|
should_be_root
|
root@localhost
|
SET SESSION AUTHORIZATION foo@'%';
|
SELECT CURRENT_USER() AS should_be_foo;
|
should_be_foo
|
foo@%
|
20250326 13:14:26,mesh,root,localhost,5,27,QUERY,test,'SELECT CURRENT_USER() AS should_be_root',0
|
20250326 13:14:26,mesh,,,5,0,CHANGEUSER,OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO,,0
|
20250326 13:14:26,mesh,foo,%,5,2,QUERY,,'SET SESSION AUTHORIZATION foo@\'%\'',0
|
20250326 13:14:26,mesh,foo,%,5,29,QUERY,,'SELECT CURRENT_USER() AS should_be_foo',0
|
disconnect con1;
|
The problem with the corrupt CHANGEUSER is not specific to SET SESSION AUTHORIZATION, it is filed as MDEV-36394.
This report is about logging "SET SESSION AUTHORIZATION" SQL command, which is written after CHANGEUSER under the new user name, which doesn't look right.