create table tt(id int, name varchar(20), value int);
create table t2(id int);
CREATE TRIGGER trg BEFORE INSERT ON tt
REFERENCING NEW as newrow
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO t2 (id) values (newrow.id);
END

insert into tt values(1, 'a', 10);
insert into tt values(2, 'b', 20);
insert into tt values(3, 'a', 30);
insert into tt values(4, 'a', 40);
The result vales in t2 are:
After insert#1: EMPTY
After insert#2: {1}
After insert#3: {1, 1, 2}
After insert#4: {1, 1, 2,1,2,3}

Tested this in Mysql and the same trigger works well there.
Expected t2 values after insert#4: {1,2,3,4}

Regards,
Tapomay.