Issue Details (XML | Word | Printable)

Key: CORE-5226
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Boltik Evgeny
Votes: 0
Watchers: 3
Operations

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

Incorrect result set (missing records) may be returned by the ORDER plan query navigating on a descending index

Created: 01/May/16 10:34 AM   Updated: 08/May/16 08:31 AM
Component/s: Engine
Affects Version/s: 2.5.0, 2.5.1, 2.5.2, 2.5.2 Update 1, 2.5.3, 2.1.7, 2.5.3 Update 1, 2.5.4, 2.5.5, 4.0 Initial, 3.0.0
Fix Version/s: 2.5.6, 3.0.1, 4.0 Alpha 1

QA Status: Deferred
Test Details: Waiting for suggest how to implement this test, letter to/from dimitr 06-may-2016 22:51.


 Description  « Hide
It happens only if the index key was removed (concurrently or by the cooperative GC) after reading it but before validating it using the fetched record. Only DESC indices are affected, the issue also depends on index key values. The bug seems to be inherited from InterBase.

Simplified example (leaf page layout):

key A, length 23, points to record 120006 (old version to be GCed)
key B, length 22, points to record 119054
key C, length 22, points to record 119535
key D, length 22, points to record 120006 (last committed version)

Key A gets GCed while reading and disappears, but key B is skipped and only records for C and D are returned. The second execution (with no GC involved) correctly returns {B, C, D}. The issue manifests itself only if key B has all its 22 bytes equal to key A (which is one byte longer).

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Boltik Evgeny added a comment - 08/May/16 08:31 AM
I tested.
everything works on Firebird-3.0.1.32510-0_Win32.