Skip to content

Expression index - more than one null value cause attempt to store duplicate value error - FB5.0 beta 2 #7710

@omachtandras

Description

@omachtandras

CREATE TABLE TEST (
FIELD1 CHAR(10) NOT NULL
);
commit;

insert into test(field1) values ('N');
insert into test(field1) values ('N');
insert into test(field1) values ('I');
commit;

CREATE UNIQUE INDEX TEST_I1 ON TEST COMPUTED BY (iif(field1 = 'I', 'I', null))
commit;

On 3.0 and 4.0 it works, but on 5.0 fails:

attempt to store duplicate value (visible to active transactions) in unique index "TEST_I1".
Problematic key value is ( = NULL).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions