Tested with Classic Server.
Session 1:
create global temporary table gtt_pr1 (n1 integer primary key) on commit preserve rows;
insert into gtt_pr1 values (1);
commit;
create global temporary table gtt_pr2 (n1 integer) on commit preserve rows;
insert into gtt_pr2 values (2);
commit;
Session 2:
alter table gtt_pr2 add foreign key (n1) references gtt_pr1;
-- Session 1 now has invalid data
Session 1:
-- Continue accepting invalid data
insert into gtt_pr2 values (3);