Skip to content

Regression: The subquery in the insert list expressions ignore the changes made earlier in the same executable block. [CORE5337] #5613

@firebird-automations

Description

@firebird-automations

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions