Submitted by: @sim1984
WI-V6.3.0.32483 Firebird 3.0
CREATE TABLE TEST (
ID INTEGER NOT NULL,
VAL INTEGER NOT NULL
);
execute block
as
begin
insert into test (id, val) values (1, 100);
insert into test (id, val) values (2, (select val from test where id = 1));
end
The insert failed because a column definition includes validation constraints.
validation error for column "TEST"."VAL", value "*** null ***".
However, here is a code works without error.
execute block
as
declare v integer;
begin
insert into test (id, val) values (1, 100);
select val from test where id = 1 into :v;
insert into test (id, val) values (2, :v);
end
This ticket is related with CORE3362.
Commits: d5ff6d8 d8f43da