Issue Details (XML | Word | Printable)

Key: CORE-2635
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Unique index with a lot of NULL keys can be corrupted at level 1

Created: 21/Sep/09 11:48 PM   Updated: 29/Aug/15 02:48 PM
Component/s: Engine
Affects Version/s: 2.1.0, 2.5 Alpha 1, 2.1.1, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3
Fix Version/s: 2.5 RC1, 2.0.6, 2.1.4

File Attachments: 1. Text File firebird.log (13 kB)

Environment: Database in ODS 11 or higher
Issue Links:
Relate
 

QA Status: Done successfully


 Description  « Hide
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


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
Firebird #44669 Tue Sep 22 21:01:16 UTC 2009 hvlad Fixed bug CORE-2635 : Unique index with a lot of NULL keys can be corrupted at level 1
Files Changed
MODIFY /firebird/trunk/src/jrd/btr.cpp

Repository Revision Date User Message
Firebird #44673 Wed Sep 23 10:32:58 UTC 2009 hvlad A little paranoid addition to the fix for CORE-2635
Files Changed
MODIFY /firebird/trunk/src/jrd/btr.cpp

Repository Revision Date User Message
Firebird #44735 Thu Sep 24 17:59:17 UTC 2009 hvlad Backport fix for bug CORE-2635 : Unique index with a lot of NULL keys can be corrupted at level 1
Files Changed
MODIFY /firebird/branches/B2_1_Release/src/jrd/btr.cpp

Repository Revision Date User Message
Firebird #44774 Fri Sep 25 20:57:36 UTC 2009 hvlad Backport fix for bug CORE-2635 : Unique index with a lot of NULL keys can be corrupted at level 1
Files Changed
MODIFY /firebird/branches/B2_0_Release/src/jrd/btr.cpp