Syntax for correctly capturing current user in a trigger
I don't understand how you have found a problem.




select CURRENT_USER();



| CURRENT_USER()                |
| :---------------------------- |
| fiddle_XQKHLETMKAXKBKBXJWXJ@% |






CREATE TABLE test (id INT, user VARCHAR(64));






CREATE TRIGGER tr_bi_test
BEFORE INSERT
ON test
FOR EACH ROW
SET NEW.user = CURRENT_USER();






INSERT INTO test (id) SELECT 1;






SELECT * FROM test;



id | user                         
-: | :----------------------------
 1 | fiddle_XQKHLETMKAXKBKBXJWXJ@%



db&lt;>fiddle here

Search the uncorrectness elsewhere.