Skip to content

Unique index with a lot of NULL keys can be corrupted at level 1 [CORE2635] #3043

Closed
@firebird-automations

Description

@firebird-automations

Submitted by: @hvlad

Is related to QA250

Attachments:
firebird.log

recreate table t (id int, sss varchar(255))
create unique descending index t_id_desc on t (id)
create unique ascending index t_id_asc on t (id)
create unique descending index t_id_sss_desc on t (id, sss)
create unique ascending index t_id_sss_asc on t (id, sss)
commit

execute block as
declare n int = 0;
begin
while (n < 10000) do
begin
insert into t values (:n, :n);
n = n + 1;
end

n = 0;
while (n < 10000) do
begin
insert into t values (null, null);
n = n + 1;
end
end
commit

execute block as
declare n int = 5000;
begin
while (n > 0) do
begin
n = n - 1;
update t set id = null, sss = null where id = :n;
end
end
commit

Validation reported

Summary of validation errors
Number of index page errors : 61

Commits: 5817591 76b52bb 0881236 aca4df4