Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
omachtandras opened this issue Aug 17, 2023 · 1 comment

Comments

@omachtandras
Copy link

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).

@hvlad hvlad self-assigned this Aug 17, 2023
hvlad added a commit that referenced this issue Aug 17, 2023
…ttempt to store duplicate value error - FB5.0 beta 2
@hvlad hvlad closed this as completed Aug 17, 2023
@omachtandras
Copy link
Author

omachtandras commented Aug 18, 2023

We tested it, the fix was correct.
Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants