I think you might be going to check it out wrong. Your insert instructions will not take time, and therefore replacing a trigger may fit in between the inserts. At least this is what I consider due to below.
If you change your test to make sure you have a long SQL statement, for example
create table test_trigger (id number); create table test_trigger_h (id number); create sequence test_trigger_seq; create or replace trigger test_trigger_t after insert on test_trigger for each row begin insert into test_trigger_h (id) values (:new.id); end; / insert into test_trigger select level from dual connect by level <= 1000000;
If you then try to replace the trigger in a separate session, this will only happen after the insert is completed.
Unfortunately, I cannot find anything in the documentation to support me; this is just the behavior that I know of.
source share