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

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:

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)

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

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

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

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
Vlad Khorsun added a comment - 21/Sep/09 11:50 PM
I didn't tested 2.0.6 yet but sooner of all it is also affected

Vlad Khorsun added a comment - 21/Sep/09 11:52 PM
firebird.log with validation errors

Vlad Khorsun added a comment - 24/Sep/09 08:11 AM
Fix is committed into 2.5 and 2.1.4.
2.0.6 will follow soon

Pavel Cisar added a comment - 26/Apr/13 09:30 AM
Test added.